Share via


SPS Farm Report

Today, I learned about a PowerShell script that is already part of some of the diagnostic tools I use in my day to day work and I just didn't know it was in there.  It's freely available online so I wanted to share.

You can go to https://github.com/jvijayw/SPSFarmReport/[](https://spsfarmreport.codeplex.com/) and download the package to get a full report on your SharePoint farm.

The ReadMe.txt has important information about what will be needed to successfully run the tool.  Because I'm using SharePoint 2013 as a base for my Project Server 2013 installation, I used the PowerShell cmdlet Get-ExecutionPolicy to learn the execution policy was already set to Unrestricted on my test farm.

I downloaded the package, then moved the o15 files to a specially created folder on my Project Server 2013 test server called spsfarmreport.  The really neat thing about this tool is you can run it on only 1 server in the farm and it will grab results from all of them.

So, I ran .\2013SPSFarmReport.ps1 from a PowerShell command prompt window and this was the output...

PS C:\spsfarmreport> .\2013SPSFarmReport.ps1
o15WriteInitialXML
o15farmConfig
o15WriteFarmGenSettings
o15enumServers
o15writeServers
o15enumProdVersions
o15writeProdVersions2
o15enumFeatures
o15writeFeatures
o15enumSolutions
o15writeSolutions
o15enumSvcApps
o15enumSPSearchServiceApps
o15enumSPSearchService
o15enumHostControllers
o15enumSearchActiveTopologies
o15enumSearchConfigAdminComponents
o15enumSearchConfigLinkStores
o15enumSearchConfigCrawlDatabases
o15enumSearchConfigCrawlRules
o15enumSearchConfigQuerySiteSettings
o15enumSearchConfigContentSources
o15writeServiceApps
o15enumSPServiceApplicationPools
o15writeSPServiceApplicationPools
o15enumSPServiceApplicationProxies
o15writeSPServiceApplicationProxies
o15enumSPServiceApplicationProxyGroups
o15writeSPServiceApplicationProxyGroups
o15enumWebApps
o15writeWebApps
o15writeAAMsnAPs
o15enumContentDBs
o15writeContentDBs
o15enumCDConfig
o15writeCDConfig
o15enumHealthReport
o15writeHealthReport
o15enumTimerJobs
o15writeTimerJobs
o15WriteEndXML
PS C:\spsfarmreport>

So where did the output file actually go?  It's not in my special spsfarmreport folder.

The readme file has the answer: Run the "[Environment]::CurrentDirectory" command to know where the output XML is written to.

I did this and found my output was being dropped here in the system32 directory.

PS C:\spsfarmreport> [Environment]::CurrentDirectory
C:\windows\system32

I copied these files to my spsfarmreport folder where the SPSFarmReport.xslt is and was able to open the .xml file using IE.

My report is pretty boring because I only have one SharePoint Server in this farm, but you get the idea.

Here's a screenshot of the output I see.

Happy hunting!

Comments

  • Anonymous
    January 01, 2003
    Thank you for commenting, BlueSky2010! You are correct, of course, about setting the path ahead of time. I did want to demonstrate what happened to me the first time I ran the script - I lost the output! Administrators who may be less experienced might run the spsfarmreport script and be in the same situation, so I feel it is helpful for me to explain the steps I took.

  • Anonymous
    January 01, 2003
    thank you indeed.SPS Farm Report

  • Anonymous
    January 01, 2003
    Thanks - I suppose it's a good idea to change path to the desired location before running the script. :-)

    • Anonymous
      April 25, 2016
      This worked for my purposes: it puts the log and xml files in the directory you are running the script from.Put the beginning of the Script: (borrows the environmental variable Current Directory)$currentDir = [Environment]::CurrentDirectory[Environment]::CurrentDirectory = (Split-Path $MyInvocation.MyCommand.Path)Put at the end of the script: (resets the environmental variable to previous value)[Environment]::CurrentDirectory = $currentDir
  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Thank you for your comment, Ivan!

  • Anonymous
    January 01, 2003
    Justin, if you can provide more detail on what happens or doesn't happen, any errors you receive, and possibly a screenshot, I might be able to help.

  • Anonymous
    March 25, 2015
    The Farm Report SharePoint 2013 doesn't work for me

    any idea what is wrong? I have SP2013 with CU March 2015

  • Anonymous
    January 05, 2016
    Hi ,

    I have tried to run this script but getting the error :could not access location csystem32
    And more over a m also getting issue that please run this script on the server where sharepoint is install.
    Please guide steps to remove .

    Thanks.

  • Anonymous
    January 05, 2016
    Manjari,

    The ReadMe.txt has important information about what will be needed to successfully run the tool. The correct path for the system32 directory is c:windowssystem32. You have to be logged onto a SharePoint server that is part of the farm you want to run the tool against.

    I hope this helps!

    Brooks.

  • Anonymous
    September 05, 2016
    Hello,I tried to run the "2013SPSFarmReport.ps1" script but its getting stuck after function "Completed running o15enumHealthReport".What could be the issue?Thanks for you support!

    • Anonymous
      September 06, 2016
      Hi Frank, I'm really not sure why the script stops running at that point. From a powershell prompt, run [Environment]::CurrentDirectory and search the resulting folder for any kind of log file that might explain what's happening. I hope this helps.