Sometimes we have the task to do some analysis on a SharePoint farm, but we do not have access to any of the servers. To do any kind of analysis in these cases, some of the installations are using tools like SPDockIt, which generate a very large output that could be used. In cases, where we do not have these tools, we can make use of the PowerShell cmdlets SharePoint provides and the PowerShell cmdlets Export-Clixml and Import-Clixml.

In Microsoft Technet we find an article about exporting the whole configuration of a farm:

Both articles write the output of the SharePoint cmdlets using Export-Clixml to a file (be careful, both scripts contain errors J). This output could be used with Import-Clixml and it will generate an object that we could use for further analysis.

So, what can we do to analyse a SharePoint environment, where we do not have access? Let anybody from the operating team (they should have access) run the PowerShell-script to generate the output-files. Copy these files to any other SharePoint environment with the same SharePoint product installed, I would recommend also to have the same patch level installed.

With this copy of the output and the PowerShell cmdlet Import-Clixml we are able to convert the output to objects and do our analysis task. See an example with the output of Get-SPServer:

Using the xml-files is not as handy as directly running SharePoint cmdlets on a SharePoint machine, but it is an option, if we do not have access to any member of the SharePoint farm. Maybe you have to deal with the depth parameter of the Export-Clixml cmdlet, to generate a proper output.

Advertisements