I am interested in finding the Farm Id of my Farm. Where is it located or how do I otherwise find it?
2 Answers
To identify a SharePoint 2007 Farm ID, you can install Microsoft Powershell onto your local development image from. (http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx)
Powershell is installed as a hotfix and can be identified as such in Add/Remove programs.
Running powershell, follow these commands, Set-ExecutionPolicy RemoteSigned[System.Reflection.Assembly]::LoadWithPartialName(“”Microsoft.SharePoint”")$spFarm = [Microsoft.SharePoint.Administration.SPfarm]::Local$spFarm Look for the ID field, this GUID is your SharePoint Farm Id. Remember to exit from the Powershell command prompt once your done.
-
So there is one detail to the above instructions that was missed. Please remember to load powershell as an administrator to set the execution policy.– Mike TJan 12, 2011 at 17:27
The correct syntax for anyone unlucky enough to still be managing a 2007 farm is below:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint"); [Microsoft.SharePoint.Administration.SPFarm]::Local.ID