Skip to main content

Blogging about SharePoint

Go Search
Home
Blogging about SharePoint
Public Speaking
  

Michael Blumenthal's BlumenthalIT.NET > Blogging about SharePoint > Posts > PowerShell Script to Disable Loopback Checking
PowerShell Script to Disable Loopback Checking

I find I need to use host headers for SharePoint sites a lot.  For example, in a recent deployment I had the following host header sites all pointing via DNS entries to the same farm/web front end (it was a small farm):

  1. ssp.foo.com
  2. mossca.foo.com
  3. intranet.foo.com

I’m doing this on Windows Server 2008, IIS 7, with the latest service packs and updates (as of this writing).  There is a know issue/feature where you will be unable to browse the sites defined by host headers from the web browser on the web front end.  This gives the distinct feeling that your SharePoint site is broken, when in fact it’s just fine.

In particular, for a development environment, you generally don’t have the option of off-server web browsing, so this becomes a big issue.  There is a KB article here http://support.microsoft.com/kb/896861 that describes what to do to fix the issue – yes, the article only says IIS 5 or 6, but this does work for IIS 7 too.

Anyway, I decided to write a PowerShell script that makes making or checking these registry edits trivial.

You can find it here: http://blumenthalit.net/Files/PowerShell%20Scripts/kb896861.ps1.txt

At some point, I should add this to CodePlex.com/psbb, but not tonight.

--Michael

Comments

Jeremy Thake

Just an FYI, you need to run PowerShell as an administrator in Windows Server 2008 to do this. Best thing to do is copy and paste entire script...then open PowerShell, click the right mouse button and hit the <ENTER> key. Then from there type the function name and hit <ENTER> e.g.
global:get-kb896861-regvalues <ENTER>
OR
global:set-kb896861-regvalues <ENTER>

Great work Michael!
at 7/15/2009 11:11 PM

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.

Title


Body *


Please put your name at the end of your comment as the Name field doesn't display in the main view of the comments.

Name: *


Your name.  If you first name is Michael, please provide initials or the like to clearly distinguish your name from Michael Blumenthal's.
Also, this field does not appear in the main view of the comments.

Need Paid Consulting Services?

Are you interested in engaging a SharePoint consultant for fee-based consulting services?  If so, I can have an Account Executive from my employer contact you.  Other site visitors will not see this column.

Additional Contact Information

Please provide additional contact information if you need a direct response.  Other site visitors will not see this column.

What is tomorrow's date? *

This is a weak CAPTCHA based on advice from a tweet from @ToddKlindt.
Attachments