1

I am interested in finding the Farm Id of my Farm. Where is it located or how do I otherwise find it?

2 Answers 2

1

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.

1
  • 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 T
    Jan 12, 2011 at 17:27
1

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
1
  • This seems to work on SharePoint 2013 as well.
    – kwill
    Apr 3, 2018 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.