Archive for May, 2009

How to generate a GUID

Found this on Serge van den Oever’s blog. This is useful when designing SP features.


Sometimes you just need a lot of GUID’s while programming. Of course you could use the Visual Studio GUID tool, but that is a lot of work.

Open a PowerShell console, and paste in the following line to get a list of 100 guid’s:

$i=100; while ($i– -gt 0) { Write-Host ([System.Guid]::NewGuid()) }

Here’s a sample of the output:


Governance structures

Matt Moore posted this in the SIKM Leaders newsgroup on Yahoo, and I found it very useful to help think about the governance structures we use. This could apply to SharePoint governance as well as KM or other systems and frameworks…

From on 5/26/09:

KM governance issues often remind me of political models:

– Are we China? [Top-down control with minimal accountability and heavy sanctions for disagreement]
– Are we the UK? [Centralized governance model with some accountability]
– Are we the US? [Demarcated split between “Federal” and “State” control]
– Are we Switzerland? [Most of the power lies in the regions with a relatively weak central government]

Of course, many organisations might be uncomfortable with these analogies.

Matt Moore

Force autologon after logging off

This isn’t strictly SharePoint-related, but might be useful to a sysadmin somewhere…

I have a few servers that are running old-fashioned console apps (meaning that there always has to be a specific user session logged in for these apps to run properly). The server is configured with an autologon feature so when the system is restarted (after patching or a power outtage), the apps are also automatically restarted.
Sometimes these apps will stop responding, and we need to restart them using a script; however, we don’t want to restart the entire server.
The problem I ran into was, if you just log off the user session, it doesn’t automatically log back in – it gets stuck on the username/password screen.

It turns out, there is a registry setting that controls this behavior. Here it is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceAutoLogon

This is a string value; if you set it to 1 (and configure the remaining registry values for auto-logon), then when you log off, Windows will log you right back in.

WSS 3.0 Service Pack 2 error

I tried installing Windows SharePoint Services 3.0 Service Pack 2 update on my Test farm last night and while running the Configuration Wizard, I encountered this error:

Failed to upgrade SharePoint Products and Technologies.
Failed to upgrade SharePoint Products and Technologies.
Further information regarding this failure can be found at
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\Upgrade.log.
An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.
Additional exception information:
Failed to upgrade SharePoint Products and Technologies.
Exception of type ‘Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException’ was thrown.

Well, the first step in resolving this type of issue is to read the error message carefully. 🙂 It’s a fairly generic error, but in the message body, it’s referencing the Upgrade.log file for more info; so I opened that file, and found the following:

[SPManager] [ERROR] [5/17/2009 9:43:26 PM]:
Access to the path **********\web.config’ is denied.
[SPManager] [ERROR] [5/17/2009 9:43:26 PM]:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

Next step, located the web.config file, checked the properties, and bingo! – web.config file attribute was set to Read-only!
This must’ve happened last time the file was deployed.

Uncheck the Read-only checkbox, click OK, rerun the Configuration Wizard, and everything worked beautifully…

Enumerate SharePoint sites and subsites using PowerShell

Here’s a simple Powershell script that will enumerate all sites and their sub-sites in your SharePoint environment.


[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c") | out-null

$oContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;

[Microsoft.SharePoint.Administration.SPWebApplicationCollection]$waColl = $oContentService.WebApplications;

$waColl1 = $waColl | where-object {$_.IsAdministrationWebApplication -eq $FALSE}

foreach ($wa in $waColl1)

$waName = $wa.Name

$sites = $wa.Sites

foreach ($obj in $sites)
$siteurl = $obj.Url.Replace("http://","").Replace(":","").split("/")

$site=new-object Microsoft.SharePoint.SPSite($obj.Url)

for($i=0; $i -lt $site.AllWebs.Count;$i++){

Write-Output $site.AllWebs[$i] | Select Url; ##Send through Pipeline

$site.Dispose(); ##ENFORCED DISPOSAL!!!




SharePoint SSP crawl error

After the latest round of MS patches, I started experiencing the following symptoms on my SharePoint farm:

1) Can no longer browse to SharePoint sites locally on the server
2) Search engine crawl broke with the following error:

“Access is denied. Check that the Default Content Access Account has access to this content.”

I tried re-entering the account password for the search crawler account, but it didn’t work. The fix was to disable LoopBackCheck in the registry (as found in this KB):

Also, this Technet forum has a pretty good discussion on the topic:

No need to restart server or make any other changes – as soon as the registry value is created, things start working beautifully.

Read Steve’s post in the forum, there are some words of caution here:

Friday, May 01, 2009 2:51 PM0 votes

This issue was caused by the .NET Framework 3.5 SP1 & Family Updates, in that the authentication methods for communication between the specific SharePoint services were changed. The DisableLoopbackCheck does in fact work, but I expect it will be the cause for additional headaches in the near future when additional Service Packs are released.

For the time being, remember to make this change on all SharePoint Servers in your farms. If not, you have additional problems, such as incredible latent pages, the application pools shutting down unexpectedly – yes…actually shutting down, and corrupting your content databases to the point that Content Deployment ad Quick Deploy will no longer work.

Fun Stuff

– Steve

Automatic Updates service fails to start

After I installed Service Pack 2 on my Windows XP workstation, the Automatic Updates service failed to start with the following error:

The Automatic Updates service terminated with the following error:
The class is configured to run as a security id different from the caller.

After some searching online, I found out that this problem is created when certain Administrative security templates are applied to a computer before installing XP SP2. I finally came across the solution here:

The solution turned out to be a one-line command entered at the command prompt:

Here’s the output:
AutomaticUpdates Fix

After I entered it, the AU service started beautifully…

Now I have to figure how to resolve a pesky TFS error message and fix the search index in my SharePoint farm…

RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Bud Ratliff blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 383,447 hits