Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > Setting the Portal Site Connection with PowerShell in SharePoint 2010
April 20
Setting the Portal Site Connection with PowerShell in SharePoint 2010

When I do SharePoint admin talks I also preach the value of scaling by site collections instead of webs. This provides numerous benefits like permissions boundaries, scalability, and quotas. One of the first pushbacks I get on this is navigation. Navigation is also bounded at the site collection level, so each site collection has different navigation, which makes it difficult for end users to get out of the site collection to other SharePoint content. Discoverability is an issue.

One solution is to set a “Portal Site Connection.” This functionality has been around for a couple of versions of SharePoint. It allows you to add a top level link in the navigation breadcrumbs. You can train your users to go to that Portal link if they get lost. This might take them to your portal home page, or some other place to help them find other site collections. Fortunately it’s pretty easy to set up, and with the power of PowerShell it’s easy to set up for a large number of site collections at once (and without the risk of renaming all of your databases or lists).

To fully appreciate the beauty of this, let’s look at the before picture. Here is what the breadcrumbs look like before we make any changes.

SharePoint 2010 4-20-2011 3.33.22 PM

The link at the top “Team” points us to the root of the site collection we’re in, http://sharepoint/sites/team. For a user trapped in this site collection it’s no help. There might as well be a smiley face there. To manually change this click Site Actions > Site Settings > Site Collection Administration > Portal site connection (/_layouts/portal.aspx). On this page you provide a URL and a description for the link.

SharePoint 2010 4-20-2011 3.42.30 PM

Now there is an additional link at the top of the breadcrumb, your lost users can sigh with relief.

SharePoint 2010 4-20-2011 3.43.52 PM

This can take your users anywhere you want, and releases some of the navigation tension caused by having multiple site collections. If you have a lot of site collections this can be pretty tedious to set. That’s where my buddy PowerShell comes in. Turns out it’s pretty easy to set this value for a bunch of site collections at one time. The following PowerShell takes all site collections that start with http://sharepoint/sites and sets their portal site connection to http://sharepoint:

get-spsite http://sharepoint/sites/* | ForEach-Object { $_.PortalName ="Portal Site" ; $_.PortalUrl = "http://sharepoint/" }

It should look like this when it runs:

SharePoint 2010 4-20-2011 4.02.40 PM

The second line simply checks your work. Since Get-SPSite lets you do some client side filtering, like shown above, you can be selective about which site collections get the setting. Different web apps or managed paths can have different portal sites, and of course you can change it at any time down the road.

Hope that helps.




SP's lockbox breadcrumbs drive me bonkers--especially when I'm in my mysite and decide, on a whim, that I'd like to visit the Marketing site collection. Going to set this up now!
 on 4/21/2011 10:02 AM

Re: Amazing!

I don't know if I'd agree that I'm Amazing, maybe we can comprise on "slightly above the average chimp." :)

Todd O. KlindtNo presence information on 4/21/2011 10:42 AM


Despite having automated a large portion of the SP 2010 install, this was always one of those routine manual things I'd mindlessly plod through not realizing it was scriptable. Once again PowerShell comes thru... I'll be incorporating into AutoSPInstaller (w/ full credit of course)!

Brian (@brianlala)
 on 4/21/2011 1:55 PM

What a time saver....

....even a blind rat will eventually find cheese.  I too am tired of just mindlessly plodding through the work.  Need to spend more time with PS - what a time saver!

Now, if Super Chimp can do the same with the Top Nav Bar......oooooo, a challenge!  <grins>

Thanks, Todd for all the help you give us admins!
 on 4/21/2011 2:37 PM

Re: What a time saver....

This chimp hasn't tackled the top nav, but another chimp has. Does this link help?

Todd O. KlindtNo presence information on 4/21/2011 3:18 PM

Re: Neato

My name is going to show up in the AutoSPInstaller??? Cool!!!

Todd O. KlindtNo presence information on 4/21/2011 3:19 PM

Realative Path

Todd, Thank you for the post. What do you suggest for using relative path for Portal Admin URL. Example, users want to use http://sharepoint when they are in office and when they are out in the field. Thanks.
 on 4/21/2011 4:41 PM

Relative Path

Sorry I mean Portal Site Connection
 on 4/21/2011 4:42 PM

Re: Relative Path

My standard guidance is that you should have it set up so your users are using the same URLs internally as externally. Some things don't know about AAMs, this is one of them. If you use the same URL internally and externally you don't have these kinds of problems. If your users are getting prompted for their passwords internally once they start using then add that URL to IE's local intranet zone. Then it will behave the same way http://sharepoint does.

Todd O. KlindtNo presence information on 4/21/2011 4:58 PM

How to disable the Portal Connection

Hi Todd,

I have many site collections to which i had set some portal connections. But now I dont want these portal connections, I mean I want to disable this option. 

I want to select the other option "do not connect to portal site" to all these site collections. Is there any way to do it by using PowerShell.

Best Regards
 on 5/24/2013 8:50 AM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person


Want a message when I reply to your comment? Put your Twitter handle here.