12/08/2012

SharePoint 2010–Hiding "Sign in as Different User"

 

The "Sign in as Different User" is a bad idea for a lot of reasons, but the two biggest are:

  • Security on the computer where "User B" wants to access SharePoint. While at this computer they could perform any number of actions as "User A".
  • Mixed experiences when using software other than a browser. As an example, "User B" can "Sign in as Different User" on the "User A" computer. Everything done from the browser, such as adding list items, is logged as "User B", but many actions performed from Word, Outlook and other tools will be logged as "User A"

"Sign in as Different User" is available from the Welcome menu and from the Access Denied page:

           clip_image002[6]           clip_image002[8]

 

How a Site Owner can hide "Sign in as Different User"

You can hide the "Sign in as Different User" option by adding a small block of JavaScript code to your site's master page just before the </body> tag.

<script type="text/javascript"> 
var doc = document.getElementsByTagName('ie:menuitem');  
for (var i = 0; i < doc.length; i++)  
{
    itm = doc[i];
    if (itm.id.match('LoginAsDifferentUser') != null)
      { itm.hidden=true; }
 } 
</script> 

Note: You can still "Sign in as Different User" by navigating directly to the Access Denied page:
  http://yourserver/sites/yoursite/_layouts/AccessDenied.aspx

 

How a developer or server administrator can hide "Sign in as Different User"

As there are two ways a user can get to the "Sign in as Different User" option you will need to make two different changes, one to the Welcome menu and one to the Access Denied page.

Warning:

  • Changes to ControlTemplates and Layouts folder impact all users on all sites in the farm!
  • Changes to the pages in the ControlTemplates and Layouts folder need to be documented as farm rebuilds or service pack updates could overwrite your changes.
  • You should make a backup copy of any files you edit.
  • All changes must be made identically on all web front end servers.
Updating the Welcome menu

The Welcome menu is implemented as an ASPX user control (.ascx) and is stored in the …\14\TEMPLATE\CONTROLTEMPLATES folder. Editing this file impact all users on all sites in the farm. You may want to use the "Site Owner" solution listed earlier in this article. Another option is to create a copy of the Welcome.ascx file and modify selected master pages to point to the custom version of the file.

  1. Open the Welcome.ascx file (or your custom copy) using Notepad or Visual Studio from
        …\14\TEMPLATE\CONTROLTEMPLATES 
  2. Find the MenuItemTemplate with the ID of ID_LoginAsDifferentUser
  3. Then do one of the following
    • Delete the MenuItemTemplate control
    • Add these two options to the MenuItemTemplate control to limit the display of the menu item to only Site Owners
         PermissionsString="ManageWeb"
         PermissionMode="Any"
Updating the Access Denied page (AccessDenied.aspx)
  1. Open the AccessDenied.aspx page using Notepad or Visual Studio:
       …\14\TEMPLATE\AccessDenied.aspx
  2. Find the following code:
      <asp:HyperLink id="HLinkLoginAsAnother"
      Text="<%  $SPHtmlEncodedResources:wss,accessDenied_logInAsAnotherOne%>"
      CssClass="ms-descriptiontext" runat="server"/>
  3. Then do one of the following:
    • Delete the code
    • Wrap the code in a comment block
    • Wrap the code in a SPSecurityTrimmedControl with a permission level such as ManageWeb (see this article) so Site Owner can still see the option.

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb">

  <asp:HyperLink id="HLinkLoginAsAnother"
  Text="<%$SPHtmlEncodedResources:wss,accessDenied_logInAsAnotherOne%>"
  CssClass="ms-descriptiontext" runat="server"/>
</SharePoint:SPSecurityTrimmedControl>

 

.

12/05/2012

Cincinnati SharePoint User Group

 

The December meeting has been canceled!

http://www.CincinnatiSPUG.org

January 2013 Meeting - SharePoint and SQL Server

Lisa Gardner will present on SharePoint and SQL Server

Lisa Gardner
Microsoft Premier Field Engineer
SQL Server
US PFE - Central Region

SharePoint is a rapidly growing application that relies heavily on SQL Server. In this session, we will discuss what a DBA needs to know to successfully manage instances hosting SharePoint databases. What configuration options are best for a SharePoint workload? What kind of maintenance should be performed? How should databases be provisioned? What the heck are all these databases for anyway? We will also discuss some nomenclature and key components of SharePoint to help DBAs better communicate with SharePoint application teams.

This presentation is aimed at DBAs who have to manage SharePoint databases, but it definitely pertains to SharePoint administrators as well.

  • Outline:
    • SharePoint Overview
    • SharePoint Databases – what they are, best practices, sizing guidance
    • SQL Server Configuration, Setup, and Maintenance for hosting SharePoint
    • What to look out for – common

 

 

See you in January!

http://www.CincinnatiSPUG.org

12/04/2012

SharePoint 2007 PowerShell cmdlets

 

This article includes the 2007 functions to emulate the SharePoint 2010 cmdlets used in my series of articles in SharePoint Pro Magazine. The first article, Exploring and Inventorying SharePoint Using PowerShell, is here: http://www.sharepointpromag.com/article/sharepoint-server-2010/exploring-inventorying-sharepoint-using-powershell-144834 . Part 2 is here: http://sharepointpromag.com/sharepoint/windows-powershell-scripts-sharepoint-info-files-pagesweb-parts with part 3 to follow.

Check back over the next week or two as I expand this content and add links to download the PowerShell module…

While this little project will in no way include all of the 500 SharePoint 2010 cmdlets, it will provide a core set of cmdlets needed to run my auditing and inventorying SharePoint 2010 PowerShell scripts. These cmdlets are implemented as PowerShell functions so you can study them and enhance them or even use them as models to create additional cmdlets. There will also be links to a download you can simply load them as a PowerShell module.

 

As a teaser… here's a starter set…   (check back in a few days for the full article)

Save the following as SP2007cmdlets.psm1:

#Notes:
# The scripts below are from http://TechTrainingNotes.blogspot.com 
# These scripts may be used in your projects but may not be republised in any form
# Formatting data found in SP2007cmdlets.format.ps1xml  (optional)

function Get-SP2007help
{
"Currently implemented cmdlets:"
"  Get-SPFarm"
"  Get-SPWebApplication"
"  Get-SPSite"
"  Get-SPWeb"
"  Get-SP"
}

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")


function Get-SPFarm()
{
  [Microsoft.SharePoint.Administration.SPFarm]::Local
}


function Get-SPWebApplication ($url)
{
  begin
  {  $foundit=$false
     if ($url -ne $null) { 
       $foundit=$true; 
       [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("$url") }
  }
  process
  {
  }
  end
  {
    if ($foundit -eq $false)
    {
       [Microsoft.SharePoint.Administration.SPWebService]::ContentService.WebApplications
    }
  }
}



function Get-SPSite ([string]$Identity, [string]$ContentDatabase)
{
<#
.SYNOPSIS
 Returns all site collections that match the given criteria.
.PARAMETER computername
  The computer name to query. Just one.
.DESCRIPTION
 The Get-SPSite cmdlet returns either a single site that matches the Identity parameter, or all the sites that match the Filter parameter for the specified scope. The scopes are the WebApplication, ContentDatabase , and SiteSubscription parameters. If none of these scopes is provided, the scope is the farm. If the scope is specified with parameter, all sites in that scope are returned.
.PARAMETER Identity 
 Specifies the URL or GUID of the site collection to get. The type must be a valid URL, in the form http://server_name or http://server_name/sites/sitename, or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).
.PARAMETER ContentDatabase
Specifies the GUID of the content database from which to list site collections.

The type must be a valid database name, in the form  SPContentDB01, or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).
#>

  begin
  {  $foundit=$false
     if ($Identity -ne "" -or $ContentDatabase -ne "") { 
       $foundit=$true;
       if ($ContentDatabase -ne "")
       {
         if(Test-TTNIsGuid($ContentDatabase))
         {
          Get-SPWebApplication | select -ExpandProperty ContentDatabases | where { $_.id -eq "$ContentDatabase"} | get-spsite
         }
         else 
         { 
          Get-SPWebApplication | select -ExpandProperty ContentDatabases | where { $_.name -eq "$ContentDatabase"} | get-spsite
         }
       }
       else
       {
         if ($Identity.toLower().StartsWith("http"))
           { New-Object Microsoft.SharePoint.SPSite("$Identity") }
         else 
           { New-Object Microsoft.SharePoint.SPSite([guid]"$Identity") }
       }
     }
  }
  process
  {
    if ($_ -ne $null)
    {
      $foundit=$true;  $_.Sites
    }
  }
  end
  {
    if ($foundit -eq $false)
    {
       Get-SPWebApplication | Get-SPSite
    }
  }
}


function Get-SPWeb ($url)
{
  begin
  {
     if ($url -ne $null) { (New-Object Microsoft.SharePoint.SPSite("$url")).OpenWeb() }
  }
  process
  {
     $_.AllWebs
  }
}


function Test-TTNIsGuid ($guid)
{
  # TechTrainingNotes helper function
  ($guid -match "^[A-Fa-f0-9]{32}$|({|\()?[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}(}|\))?$|^({)?[0xA-Fa-f0-9]{3,10}(, {0,1}[0xA-Fa-f0-9]{3,6}){2}, {0,1}({)([0xA-Fa-f0-9]{3,4}, {0,1}){7}[0xA-Fa-f0-9]{3,4}(}})$")
}

Save the following as SP2007cmdlets.format.ps1xml: 
( file to be posted with the complete article )
 
. 

11/27/2012

SharePoint 2013 First Looks for ITPros and Developers

 

I will be presenting two FREE First Look clinics this Friday at MAX Technical Training. You can attend these sessions in person at MAX's Mason, Ohio training center or remotely using your PC.

Just for fun, when registering… add a note that "Mike sent me!"  (Or maybe… "Attending in spite of Mike")

 

MS-40027 First Look: What's New for Developers in Microsoft SharePoint 2013

More info here: http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=43826

This 1/2 day instructor-led developer first-look course provides an overview of the new features, functional areas, product enhancements, and application models in SharePoint 13.

At Course Completion

  • Provide an overview of the new features, functional areas, and product enhancements in SharePoint 2013.
  • Summarize the key features of the SharePoint 2013 application development platform and describe the key features of Marketplaces.
  • Explain what a SharePoint-Hosted app is, and describe how to build a SharePoint-Hosted app.
  • Explain what a Cloud-Hosted app is, and describe how to build a Cloud-Hosted app.
  • Describe how developers extend Office Application user interfaces by creating Apps for Office and publishing them in different catalogs.
  • Describe how to create and code a simple App for Office that interacts with document content.
  • Describe improvements in Manage Metadata Services, Enterprise Content Management and Web Content Management in SharePoint 2013.
  • Describe the new social networking functionality available to SharePoint 2013 App developers.
  • Describe how the new capabilities of the SharePoint Search engine can be used in SharePoint Apps.
  • Describe how to query the index from a SharePoint-Hosted app using CSOM.

 

MS-40028 First Look Clinic: What’s New for IT Professionals in Microsoft SharePoint Server 2013

More info here: http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=44107

This 1/2 day instructor-led first-look clinic explains the new and improved product features as applicable to IT Professionals and how to install, deploy, manage, and administer SharePoint Server 2013. It also provides information on how to integrate SharePoint Server 2013 with key applications and how to maintain and troubleshoot SharePoint Server 2013.

At course completion:

  • Identify the major new features in SharePoint 2013 for IT Pros
  • Discuss the major architectural changes in SharePoint 2013
  • Describe the major changes to the BCS and the search service
  • Describe the new BI and composites features in SharePoint 2013
  • Describe the new content management and compliance features
  • Identify the new features for social computing and mobile users

 

See ya Friday!

 

.

11/15/2012

SharePoint 2013 Exams

 

The SharePoint 2013 exams are starting to show up!  As I prepare for these exams I will collect and share my notes. Of course all of these notes will only be from my prep and will not be updated after I take the exams.

If you are looking for the 2007 exams… well it's too late for all but one, at least according the exam pages at the Microsoft Learning site (70-631 expires 3/31/2011, 70-630 expires 9/30/12, 70-541 expires 6/30/11 and 70-542 expires 1/31/2013).

If you are looking for the 2010 exams and notes then see here: http://techtrainingnotes.blogspot.com/2010/02/sharepoint-certification.html
If you experienced at SharePoint 2010 then I would recommend taking the 2010 exams before taking the 2013 exams. There should be a lot of overlap in the core content that will help you with the 2013 exams.

MCSE!

Notice the new name for the certification, MCSE, not MSITP. And now "MCSE" = Microsoft Certified Solutions Expert, not Microsoft Certified System Engineer.

For SharePoint Administrators:

Windows Server 2012 certification plus the two SharePoint 2013 exams. Let me say that again… Windows Server 2012 certification… plus the two SharePoint exams gets you the MSCE. (Some more info here.)

For Windows Server 2012:

You will need to have the Microsoft Certified Solutions Associate (MCSA) certification for Server 2012. For this you will need:

  • Windows Server exams 70-410 plus 70-411 plus 70-412
  • Or the "SharePoint 2010 MCITP: SharePoint Administrator" plus 70-417

For SharePoint 2013, the above plus:

 

For SharePoint Developers:

(coming soon!)

 

.

SharePoint Admins… are you Windows Server 2012 MCSA certified?

 

The public certification exams for SharePoint 2013 will not be available until the first of the year. But… new for the SharePoint Server Administrator is the requirement to be “MCSA: Windows Server 2012” certified. (details here: http://www.microsoft.com/learning/en/us/certification/cert-sharepoint-server.aspx)

This is going to be a surprise to many SharePoint admins and something they need to get working on if they plan to be SharePoint 2013 certified. Existing SharePoint 2010 “MCITP: SharePoint Administrator” certified folks can upgrade by taking Exam 417.

Training:

The following classes are available to help get your there: 20417A: Upgrading Your Skills to MCSA Windows Server 2012 (5 Days) or 20410A plus 20411A plus 20412A (15 days total).

Here's the links to the exams:

70-410 Installing and Configuring Windows Server 2012

70-411 Administering Windows Server 2012

70-412 Configuring Advanced Windows Server 2012 Services

70-417 Upgrading Your Skills to MCSA Windows Server 2012

.

11/13/2012

Searching the MSDN and TechNet forums for SharePoint 2013

 

I'm doing a lot of 2013 work right now. Learning it, preparing for the exams, writing courseware, getting ready to deliver training sessions… all of which send me to the MSDN and TechNet forums to find stuff. The only problem is, there is no obvious way to search a single forum.

Use the Wiki Luke!

http://social.technet.microsoft.com/wiki/contents/articles/6453.how-to-use-the-search-in-the-msdntechnet-forums-and-library-en-us.aspx

There is a forum wiki article all about search and the tips there seem to work great for everything except for the SharePoint forums. The official way to search a single forum is to enter the following into the "Search TechNet with Bing" box on the TechNet pages or "Search MSDN with Bing" box on the MSDN pages:

keywords meta:Search.MSForums.GroupName(forumname)

The forumname is the name listed in the URL of the forum:
   http://social.msdn.microsoft.com/Forums/en-US/sharepointadminprevious/threads

There's a problem though… recently Microsoft rearranged and renamed many of the SharePoint forums. Instead of giving them useful names like 2013, 2010 and 2007 they called them (in the case of the admin forums) "sharepointadmin", "sharepointadminprevious" and "sharepointadminlegacy". (Makes you wonder what they will do when the next version is released!)

Second problem… to use the above tip you have to start in the right page. I have always thought that the forums were the forums. TechNet and MSDN where just two brandings of the same content. Doing a basic search in either returns content from both. Doing a basic search for a DEV topic in TechNet finds the DEV content and displays the DEV forums with a TechNet URL. (the same is true for basic searches in MSDN finding admin content and displaying it with an MSDN URL)

But when it comes to searching in MSDN for a SharePoint admin forum, it fails. I.e. Entering "meta:Search.MSForums.ForumName(sharepointadmin)" into "Search MSDN with Bing" will get zero results.

Repeating the same search in TechNet works! I.e. Entering "meta:Search.MSForums.ForumName(sharepointadmin)" into "Search TechNet with Bing" works!

 

Google to the Rescue?

OK, currently it looks like the best way to search the forums is by using Google. Sad smile

Enter the following into Google: (Thanks Robert Aldwinckle!)

keywords inurl:sharepointadmin site:microsoft.com intitle:2013

The text for inurl is the forum name as found in the URL to the forum.
  http://social.msdn.microsoft.com/Forums/en-US/sharepointadmin/...

Setting intitle to 2013 removes the "legacy" forums from the results.

So now I can search the "SharePoint 2013 - Setup, Upgrade, Administration and Operations" (sharepointadmin) for info about "Quick Launch":

Quick Launch inurl:sharepointadmin site:microsoft.com intitle:2013

 

So the forums actually came to the rescue in the end!

To see the discussion that led to this solution see here:
http://social.msdn.microsoft.com/Forums/en-US/reportabug/thread/1b94ec41-c2c7-406f-aa03-81179b40b1ce

 

.

11/09/2012

SharePoint 2013 Requirement: "The SharePoint parsing process crashes"

 

Yah, I know, it's just the title of a KB patch. But it sure looks like it's a requirement that SharePoint must crash Windows Server!

Minimum software requirements:
The SharePoint parsing process crashes in Windows Server 2008 R2"

 

image

.

11/05/2012

Finding the Missing SharePoint 2013 Slide Library


The Slide Library is not listed as an "App" or displayed in the old Create.aspx page (_layouts/create.aspx). But… you can still get it with a direct URL. I would not depend on it being there forever as the Slide Library is officially not in 2013, but for now you can create one.

The direct URL to create the old Slide Library:
http://yourserver/sites/yoursite/_layouts/15/slnew.aspx?FeatureId={0be49fe9-9bc9-409d-abf9-702753bd878d}&ListTemplate=2100


Update 11/9/12: I just tested the Office 365 (2013) Preview and it works there too!
Update 04/5/16: I just tested the Office 365 (current) and SP 2016 and it works there too!

SharePoint 2013 Education Templates

 

Does SharePoint 2013 have built-in education related sites, quizzes and tools for schools?

I'm starting my prep for the future SharePoint 2013 exams. In looking at the new PowerShell commands (there are 199 of them! 572 vs 771) I ran across these: Install-SPEduSites and New-SPEduClass. So far I can't find anything official on these new "education" features. PowerShell's help command only lists the name of the cmdlet and no description or other details.

  image

Below is all I've found so far. I'll update this as I find more… and please post comments to anything you may find. This may be an incomplete feature that may never be supported in 2013, or it may be a feature that becomes official in a future service pack, or it may only be available under a special school only edition. Who knows at this point…

 

What I've found so far:

Microsoft Goes Back to School and Gets Smart: SharePoint 2013 & Education Services
http://www.cmswire.com/cms/information-management/microsoft-goes-back-to-school-and-gets-smart-sharepoint-2013-education-services-017197.php

SharePoint Education – Installing and Configuring
http://blog.furuknap.net/sharepoint-education-installing-and-configuring

Some key SharePoint 2013 features (scroll down towards the end to find "Education Services"): (thanks Tanya for the link!)
http://www.sharepointgeoff.com/sharepoint-2013-features/

It appears to be managed from Central Administration:
http://imageshack.us/photo/my-images/831/centrald.png/

A question has been posted in the MSDN/TechNet forums, so a discussion has been started here:
http://social.msdn.microsoft.com/Forums/en-US/sharepointgeneral/thread/4851485e-5089-494b-bddd-1362eaebb0bf

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.