Using Powershell to Document SharePoint 2010 Farm Configuration

Applies To: SharePoint 2010

Business continuity (Disaster Recovery) is an important topic for SharePoint 2010 and Microsoft has provided a helpful book available online here: Business Continuity Management for Microsoft SharePoint Server 2010. The book is full of steps and options for backing up and restoring your farm.

There is an interesting powershell script starting on page 132 that takes advantage of the Export-Clixml powershell cmdlet to cycle through your farm’s configuration and write everything to XML files. The resulting XML isn’t super user friendly, but it is human readable. Even cooler is that you can use the Import-Clixml cmdlet to instantiate those objects back in powershell later.

Obviously an actual Farm backup (configuration-only) is more helpful for restoration of your settings, but these XML files can be very useful. For instance, if you don’t want to restore all your configuration but just want to document it somewhere so you can either reference it in whole or in part, this is a great solution. Even better is using it as a guide to pick and choose the various commands when you’re trying to find some information on the fly.

Unfortunately, the script is all jumbled together and split across multiple pages making the included suggestion of copying and pasting into a text document more complicated than needed. The newlines are all in the wrong places, the comments run together and overwrite commands, page numbers show up, etc. So, I went through the resulting file and formatted it correctly. You can use the copy toolbar to get it directly:

##
## Common SharePoint configuration settings
##

#Retrieve Web Application information. The default depth of 2 does not return much detail--we recommend that you use a depth of 4 for this cmdlet.
Get-SPWebApplication | Export-Clixml .\WebAppFilename.xml -depth 4

#Retrieve custom layout information.
Get-SPWebApplication | Get-SPCustomLayoutsPage | Export-Clixml .\Get-SPCustomLayoutsPage.xml

#Determine how SharePoint designer access is configured.
Get-SPWebApplication | Get-SPDesignerSettings | Export-Clixml .\Get-SPDesignerSettings.xml

#Retrieve information about alternate access mapping
Get-SPAlternateURL | Export-Clixml .\Get-SPAlternateURL.xml

#Retrieve information about content databases
Get-SPContentDatabase | Export-Clixml .\Get-SPContentDatabase.xml

#Retrieve database properties for each database
Get-SPDatabase | Export-Clixml .\Get-SPDatabase.xml

#Retrieve information about all SharePoint Products installed in the farm, and the versions of all updates installed for each product.
Get-SPProduct | Export-Clixml .\Get-SPProduct.xml

#Retrieve farm information
Get-SPFarm | Export-Clixml .\Get-SPFarm.xml
Get-SPFarmConfig | Export-Clixml .\Get-SPFarmConfig.xml

#Retrieve information about the servers in the farm
Get-SPServer | Export-Clixml .\Get-SPServer.xml

#Retrieve information about installed features
Get-SPFeature | Export-Clixml .\Get-SPFeature.xml

#Retrieve information about globally-installed site templates
Get-SPWebTemplate | Export-Clixml .\Get-SPWebTemplate.xml

#Retrieve information about deployed solutions
Get-SPSolution | Export-Clixml .\Get-SPSolution.xml

#Retrieve information about sandboxed solutions deployed in a site collection
Get-SPSite | Get-SPUserSolution | Export-Clixml .\Get-SPUserSolution.xml

#Retrieve information about claims authentication
Get-SPTrustedIdentityTokenIssuer | Export-Clixml .\Get-SPTrustedIdentityTokenIssuer.xml
Get-SPTrustedServiceTokenIssuer | Export-Clixml .\Get-SPTrustedServiceTokenIssuer.xml
Get-SPTrustedRootAuthority | Export-Clixml .\Get-SPTrustedRootAuthority.xml

#Retrieve information about installed Help
Get-SPHelpCollection | Export-Clixml .\Get-SPHelpCollection.xml

#Retrieve information about the logging levels that have been set
Get-SPLogLevel | Export-Clixml .\Get-SPLogLevel.xml

#Retrieve information about the sites in the farm
Get-SPSite | Export-Clixml .\Get-SPSite.xml
Get-SPSiteAdministration | Export-Clixml .\Get-SPSiteAdministration.xml
Get-SPSiteSubscription | Export-Clixml .\Get-SPSiteSubscription.xml

#Retrieve ULS logging information
Get-SPDiagnosticConfig | Export-Clixml .\Get-SPDiagnosticConfig.xml
Get-SPDiagnosticsPerformanceCounter | Export-Clixml .\Get-SPDiagnosticsPerformanceCounter.xml
Get-SPDiagnosticsProvider | Export-Clixml .\Get-SPDiagnosticsProvider.xml

#Retrieve information about accounts registered in the configuration database
Get-SPManagedAccount | Export-Clixml .\Get-SPManagedAccount.xml
Get-SPProcessAccount | Export-Clixml .\Get-SPProcessAccount.xml
Get-SPShellAdmin | Export-Clixml .\Get-SPShellAdmin.xml

#Retrieve specific information about the certificate authority
Get-SPCertificateAuthority | Export-Clixml .\Get-SPCertificateAuthority.xml
Get-SPClaimProvider | Export-Clixml .\Get-SPClaimProvider.xml
Get-SPClaimProviderManager | Export-Clixml .\Get-SPClaimProviderManager.xml

#Retrieve information about content deployment jobs
Get-SPContentDeploymentJob | Export-Clixml .\Get-SPContentDeploymentJob.xml
Get-SPContentDeploymentPath | Export-Clixml .\Get-SPContentDeploymentPath.xml

#Retrieve information about the Mobile Messaging account.
Get-SPWebApplication | Get-SPMobileMessagingAccount | Export-Clixml .\Get-SPMobileMessagingAccount.xml

##
##Common service infrastructure settings
##

#Retrieve information about the service applications in the farm
Get-SPServiceApplication | Export-Clixml .\Get-SPServiceApplication.xml
Get-SPServiceApplicationPool | Export-Clixml .\Get-SPServiceApplicationPool.xml
Get-SPServiceApplicationProxy | Export-Clixml .\Get-SPServiceApplicationProxy.xml
Get-SPServiceApplicationProxyGroup | Export-Clixml .\Get-SPServiceApplicationProxyGroup.xml
Get-SPServiceApplication | Get-SPServiceApplicationEndpoint | Export-Clixml .\Get-SPServiceApplicationEndpoint.xml

#Retrieve information about the services running in the farm
Get-SPServiceInstance | Export-Clixml .\Get-SPServiceInstance.xml

#Retrieve information about InfoPath form services
Get-SPInfoPathFormsService | Export-Clixml .\Get-SPInfoPathFormsService.xml
Get-SPInfoPathFormTemplate | Export-Clixml .\Get-SPInfoPathFormTemplate.xml

##
#WARNING: The following cmdlet requires run as administrator rights.
Get-SPInfoPathUserAgent | Export-Clixml .\Get-SPInfoPathUserAgent.xml

#Retrieve information about common Web service settings
Get-SPServiceHostConfig | Export-Clixml .\Get-SPServiceHostConfig.xml

##
## Common service application settings
##

#Access Services
#Retrieve specific information for the Access Services service application
Get-SPAccessServiceApplication | Export-Clixml .\Get-SPAccessServiceApplication.xml

#Application Discovery and Load Balancer Service Application
Get-SPTopologyServiceApplication | Export-Clixml .\Get-SPTopologyServiceApplication.xml
Get-SPTopologyServiceApplicationProxy | Export-Clixml .\Get-SPTopologyServiceApplicationProxy.xml

#Business Data Connectivity Service
#Retrieve information about data connection files.

##
#WARNING: The following cmdlet requires run as administrator rights
Get-SPDataConnectionFile | Export-Clixml .\Get-SPDataConnectionFile.xml

##
#WARNING: The following cmdlet requires run as administrator rights
Get-SPDataConnectionFile | Get-SPDataConnectionFileDependent | Export-Clixml .\Get-SPDataConnectionFileDependent.xml

#Excel Services Application
#Note: An Excel service application must be provisioned for the following cmdlets to succeed.
Get-SPExcelServiceApplication | Get-SPExcelBlockedFileType | Export-Clixml .\Get-SPExcelBlockedFileType.xml
Get-SPExcelServiceApplication | Get-SPExcelDataConnectionLibrary | Export-Clixml .\Get-SPExcelDataConnectionLibrary.xml
Get-SPExcelServiceApplication | Get-SPExcelDataProvider | Export-Clixml .\Get-SPExcelDataProvider.xml
Get-SPExcelServiceApplication | Get-SPExcelFileLocation | Export-Clixml .\Get-SPExcelFileLocation.xml
Get-SPExcelServiceApplication | Export-Clixml .\Get-SPExcelServiceApplication.xml
Get-SPExcelServiceApplication | Get-SPExcelUserDefinedFunction | Export-Clixml .\Get-SPExcelUserDefinedFunction.xml
Get-SPWebApplication | Get-SPInfoPathWebServiceProxy | Export-Clixml .\Get-SPInfoPathWebServiceProxy.xml
Get-SPWebApplication | Get-SPManagedPath | Export-Clixml .\Get-SPManagedPath.xml

#Managed Metadata Service
#Note: A Managed Metadata service application must be provisioned for the following cmdlets to succeed.
Get-SPServiceApplication | ?{$_.TypeName -eq "Managed Metadata Service"} | %{$id = $_.Id;Get-SPMetadataServiceApplication -Id $_ | Export-Clixml .\Get-SPMetadataServiceApplication-$id.xml}
Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "Managed Metadata Service Connection"} | %{$id = $_.Id;Get-SPMetadataServiceApplicationProxy -Id $_ | Export-Clixml .\Get-SPMetadataServiceApplicationProxy-$id.xml}
Get-SPSite | Get-SPTaxonomySession | Export-Clixml .\Get-SPTaxonomySession.xml

#PerformancePoint Service Application
#Note: A PerformancePoint service application must be provisioned for the following cmdlets to succeed.
Get-SPPerformancePointServiceApplication | Get-SPPerformancePointSecureDataValues | Export-Clixml .\Get-SPPerformancePointSecureDataValues.xml
Get-SPPerformancePointServiceApplication | Export-Clixml .\Get-SPPerformancePointServiceApplication.xml
Get-SPPerformancePointServiceApplication | Get-SPPerformancePointServiceApplicationTrustedLocation | Export-Clixml .\Get-SPPerformancePointServiceApplicationTrustedLocation.xml

#Search
#Retrieve search information
#Note: A Search service application must be provisioned for the following cmdlets to succeed.
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchAdministrationComponent | Export-Clixml .\Get-SPEnterpriseSearchAdministrationComponent.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlContentSource | Export-Clixml .\Get-SPEnterpriseSearchCrawlContentSource.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlCustomConnector | Export-Clixml .\Get-SPEnterpriseSearchCrawlCustomConnector.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlDatabase | Export-Clixml .\Get-SPEnterpriseSearchCrawlDatabase.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlExtension | Export-Clixml .\Get-SPEnterpriseSearchCrawlExtension.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlMapping | Export-Clixml .\Get-SPEnterpriseSearchCrawlMapping.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlRule | Export-Clixml .\Get-SPEnterpriseSearchCrawlRule.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlTopology | Export-Clixml .\Get-SPEnterpriseSearchCrawlTopology.xml
$searchApp = Get-SPEnterpriseSearchServiceApplication;
Get-SPEnterpriseSearchExtendedClickThroughExtractorJobDefinition -SearchApplication $searchApp | Export-Clixml .\Get-SPEnterpriseSearchExtendedClickThroughExtractorJobDefinition.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchExtendedConnectorProperty | Export-Clixml .\Get-SPEnterpriseSearchExtendedConnectorProperty.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchExtendedQueryProperty | Export-Clixml .\Get-SPEnterpriseSearchExtendedQueryProperty.xml

##
#WARNING: The following cmdlet generates a 120MB file that records the out of the box settings#
##
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchLanguageResourcePhrase | Export-Clixml .\Get-SPEnterpriseSearchLanguageResourcePhrase.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataCategory | Export-Clixml .\Get-SPEnterpriseSearchMetadataCategory.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataCrawledProperty | Export-Clixml .\Get-SPEnterpriseSearchMetadataCrawledProperty.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataManagedProperty | Export-Clixml .\Get-SPEnterpriseSearchMetadataManagedProperty.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataMapping | Export-Clixml .\Get-SPEnterpriseSearchMetadataMapping.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchPropertyDatabase | Export-Clixml .\Get-SPEnterpriseSearchPropertyDatabase.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryAuthority | Export-Clixml .\Get-SPEnterpriseSearchQueryAuthority.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryDemoted | Export-Clixml .\Get-SPEnterpriseSearchQueryDemoted.xml
Get-SPEnterpriseSearchQueryAndSiteSettingsService | Export-Clixml .\Get-SPEnterpriseSearchQueryAndSiteSettingsService.xml
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance | Export-Clixml .\Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance.xml
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy | Export-Clixml .\Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy.xml
Get-SPEnterpriseSearchService | Export-Clixml .\Get-SPEnterpriseSearchService.xml
Get-SPEnterpriseSearchServiceInstance | Export-Clixml .\Get-SPEnterpriseSearchServiceInstance.xml
Get-SPSearchService | Export-Clixml .\Get-SPSearchService.xml
Get-SPSearchServiceInstance | Export-Clixml .\Get-SPSearchServiceInstance.xml

##
#WARNING: The following cmdlet generates a file per site collection#
##
Get-SPSite | %{$id = $_.Id;Get-SPEnterpriseSearchQueryKeyword -Site $_ | Export-Clixml .\Get-SPEnterpriseSearchQueryKeyword-$id.xml}
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryScope | Export-Clixml .\Get-SPEnterpriseSearchQueryScope.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryScope | Get-SPEnterpriseSearchQueryScopeRule | Export-Clixml .\Get-SPEnterpriseSearchQueryScopeRule.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQuerySuggestionCandidates | Export-Clixml .\Get-SPEnterpriseSearchQuerySuggestionCandidates.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryTopology | Export-Clixml .\Get-SPEnterpriseSearchQueryTopology.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchRankingModel | Export-Clixml .\Get-SPEnterpriseSearchRankingModel.xml
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchSecurityTrimmer | Export-Clixml .\Get-SPEnterpriseSearchSecurityTrimmer.xml
Get-SPEnterpriseSearchServiceApplication | Export-Clixml .\Get-SPEnterpriseSearchServiceApplication.xml
Get-SPEnterpriseSearchServiceApplicationProxy | Export-Clixml .\Get-SPEnterpriseSearchServiceApplicationProxy.xml
Get-SPEnterpriseSearchSiteHitRule | Export-Clixml .\Get-SPEnterpriseSearchSiteHitRule.xml

#Security Token Service Application
#Retrieve information about the security token service used for incoming SOAP messages.
Get-SPSecurityTokenServiceConfig | Export-Clixml .\Get-SPSecurityTokenServiceConfig.xml

#State Service
#Retrieve information about the State Service.
Get-SPSessionStateService | Export-Clixml .\Get-SPSessionStateService.xml
Get-SPStateServiceApplication | Export-Clixml .\Get-SPStateServiceApplication.xml
Get-SPStateServiceApplicationProxy | Export-Clixml .\Get-SPStateServiceApplicationProxy.xml
Get-SPStateServiceDatabase | Export-Clixml .\Get-SPStateServiceDatabase.xml

#Usage and Health data collection
#Retrieve information about the Usage and Health Data Collection service application.
Get-SPUsageApplication | Export-Clixml .\Get-SPUsageApplication.xml
Get-SPUsageDefinition | Export-Clixml .\Get-SPUsageDefinition.xml
Get-SPUsageService | Export-Clixml .\Get-SPUsageService.xml

#Visio Service
#A Visio service application must be provisioned for the following cmdlets to succeed.
Get-SPVisioServiceApplication | Get-SPVisioExternalData | Export-Clixml .\Get-SPVisioExternalData.xml
Get-SPVisioServiceApplication | Get-SPVisioPerformance | Export-Clixml .\Get-SPVisioPerformance.xml
Get-SPVisioServiceApplication | Get-SPVisioSafeDataProvider | Export-Clixml .\Get-SPVisioSafeDataProvider.xml
Get-SPVisioServiceApplication | Export-Clixml .\Get-SPVisioServiceApplication.xml
Get-SPVisioServiceApplicationProxy | Export-Clixml .\Get-SPVisioServiceApplicationProxy.xml

#Web Analytics Service Application
#A Web Analytics service application must be provisioned for the following cmdlets to succeed.
Get-SPServiceApplication | ?{$_.TypeName -eq "Web Analytics Service Application"} | %{$id = $_.Id;Get-SPWebAnalyticsServiceApplication -Id $_ | Export-Clixml .\Get-SPWebAnalyticsServiceApplication-$id.xml}
Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "Web Analytics Service Application Proxy"} | %{$id = $_.Id;Get-SPWebAnalyticsServiceApplicationProxy -Id $_ | Export-Clixml .\Get-SPWebAnalyticsServiceApplicationProxy-$id.xml}
Get-SPWebApplication | Get-SPWebApplicationHttpThrottlingMonitor | Export-Clixml .\Get-SPWebApplicationHttpThrottlingMonitor.xml
Get-SPWebPartPack | Export-Clixml .\Get-SPWebPartPack.xml

#Word Automation Services
#
##Note: These cmdlets are commented out because you are unlikely to want to run them. ##
#
#Get-SPSite | %{$web=Get-SPWeb $_.Url;$webid=$web.Id;$web | Get-SPUser | Export-Clixml .\Get-SPUser-$webid.xml}
#Get-SPSite | %{$web=Get-SPWeb $_.Url;$webid=$web.Id;$web | Export-Clixml .\Get-SPWeb-$webid.xml}
The above is taken directly from Microsoft’s book and I have not added anything in terms of commands or comments.

Depending on the size/complexity of your farm this may take a while to run (15-30 minutes) and will generate 120+ XML files (1+ GB) in your management shell’s current directory. The noclobber parameter is also not used with the Export-Clixml cmdlets and so any previous xml files will be overwritten.

Advertisements

3 thoughts on “Using Powershell to Document SharePoint 2010 Farm Configuration

    • @Okeo, ha! Guess I’m not too great at searching :). That article was published nearly 2 years before I wrote this entry – Oops! I appreciate the link. Perhaps those like me that couldn’t find the script will benefit from my post and be especially glad to see the actual link to technet as well? Or maybe they’ll just laugh. Thanks for taking the time to comment.

  1. ##
    ## Common SharePoint configuration settings
    ##

    #Retrieve Web Application information. The default depth of 2 does not return much detail–we recommend that you use a depth of 4 for this cmdlet.
    Get-SPWebApplication | Out-File C:\Scripts\SharepointConfig\WebAppFilename.txt

    #Retrieve custom layout information.
    Get-SPWebApplication | Get-SPCustomLayoutsPage | Out-File C:\Scripts\SharepointConfig\Get-SPCustomLayoutsPage.txt

    #Determine how SharePoint designer access is configured.
    Get-SPWebApplication | Get-SPDesignerSettings | Out-File C:\Scripts\SharepointConfig\Get-SPDesignerSettings.txt

    #Retrieve information about alternate access mapping
    Get-SPAlternateURL | Out-File C:\Scripts\SharepointConfig\Get-SPAlternateURL.txt

    #Retrieve information about content databases
    Get-SPContentDatabase | Out-File C:\Scripts\SharepointConfig\Get-SPContentDatabase.txt

    #Retrieve database properties for each database
    Get-SPDatabase | Out-File C:\Scripts\SharepointConfig\Get-SPDatabase.txt

    #Retrieve information about all SharePoint Products installed in the farm, and the versions of all updates installed for each product.
    Get-SPProduct | Out-File C:\Scripts\SharepointConfig\Get-SPProduct.txt

    #Retrieve farm information
    Get-SPFarm | Out-File C:\Scripts\SharepointConfig\Get-SPFarm.txt
    Get-SPFarmConfig | Out-File C:\Scripts\SharepointConfig\Get-SPFarmConfig.txt

    #Retrieve information about the servers in the farm
    Get-SPServer | Out-File C:\Scripts\SharepointConfig\Get-SPServer.txt

    #Retrieve information about installed features
    Get-SPFeature | Out-File C:\Scripts\SharepointConfig\Get-SPFeature.txt

    #Retrieve information about globally-installed site templates
    Get-SPWebTemplate | Out-File C:\Scripts\SharepointConfig\Get-SPWebTemplate.txt

    #Retrieve information about deployed solutions
    Get-SPSolution | Out-File C:\Scripts\SharepointConfig\Get-SPSolution.txt

    #Retrieve information about sandboxed solutions deployed in a site collection
    Get-SPSite | Get-SPUserSolution | Out-File C:\Scripts\SharepointConfig\Get-SPUserSolution.txt

    #Retrieve information about claims authentication
    Get-SPTrustedIdentityTokenIssuer | Out-File C:\Scripts\SharepointConfig\Get-SPTrustedIdentityTokenIssuer.txt
    Get-SPTrustedServiceTokenIssuer | Out-File C:\Scripts\SharepointConfig\Get-SPTrustedServiceTokenIssuer.txt
    Get-SPTrustedRootAuthority | Out-File C:\Scripts\SharepointConfig\Get-SPTrustedRootAuthority.txt

    #Retrieve information about installed Help
    Get-SPHelpCollection | Out-File C:\Scripts\SharepointConfig\Get-SPHelpCollection.txt

    #Retrieve information about the logging levels that have been set
    Get-SPLogLevel | Out-File C:\Scripts\SharepointConfig\Get-SPLogLevel.txt

    #Retrieve information about the sites in the farm
    Get-SPSite | Out-File C:\Scripts\SharepointConfig\Get-SPSite.txt
    Get-SPSiteAdministration | Out-File C:\Scripts\SharepointConfig\Get-SPSiteAdministration.txt
    Get-SPSiteSubscription | Out-File C:\Scripts\SharepointConfig\Get-SPSiteSubscription.txt

    #Retrieve ULS logging information
    Get-SPDiagnosticConfig | Out-File C:\Scripts\SharepointConfig\Get-SPDiagnosticConfig.txt
    Get-SPDiagnosticsPerformanceCounter | Out-File C:\Scripts\SharepointConfig\Get-SPDiagnosticsPerformanceCounter.txt
    Get-SPDiagnosticsProvider | Out-File C:\Scripts\SharepointConfig\Get-SPDiagnosticsProvider.txt

    #Retrieve information about accounts registered in the configuration database
    Get-SPManagedAccount | Out-File C:\Scripts\SharepointConfig\Get-SPManagedAccount.txt
    Get-SPProcessAccount | Out-File C:\Scripts\SharepointConfig\Get-SPProcessAccount.txt
    Get-SPShellAdmin | Out-File C:\Scripts\SharepointConfig\Get-SPShellAdmin.txt

    #Retrieve specific information about the certificate authority
    Get-SPCertificateAuthority | Out-File C:\Scripts\SharepointConfig\Get-SPCertificateAuthority.txt
    Get-SPClaimProvider | Out-File C:\Scripts\SharepointConfig\Get-SPClaimProvider.txt
    Get-SPClaimProviderManager | Out-File C:\Scripts\SharepointConfig\Get-SPClaimProviderManager.txt

    #Retrieve information about content deployment jobs
    Get-SPContentDeploymentJob | Out-File C:\Scripts\SharepointConfig\Get-SPContentDeploymentJob.txt
    Get-SPContentDeploymentPath | Out-File C:\Scripts\SharepointConfig\Get-SPContentDeploymentPath.txt

    #Retrieve information about the Mobile Messaging account.
    Get-SPWebApplication | Get-SPMobileMessagingAccount | Out-File C:\Scripts\SharepointConfig\Get-SPMobileMessagingAccount.txt

    ##
    ##Common service infrastructure settings
    ##

    #Retrieve information about the service applications in the farm
    Get-SPServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPServiceApplication.txt
    Get-SPServiceApplicationPool | Out-File C:\Scripts\SharepointConfig\Get-SPServiceApplicationPool.txt
    Get-SPServiceApplicationProxy | Out-File C:\Scripts\SharepointConfig\Get-SPServiceApplicationProxy.txt
    Get-SPServiceApplicationProxyGroup | Out-File C:\Scripts\SharepointConfig\Get-SPServiceApplicationProxyGroup.txt
    Get-SPServiceApplication | Get-SPServiceApplicationEndpoint | Out-File C:\Scripts\SharepointConfig\Get-SPServiceApplicationEndpoint.txt

    #Retrieve information about the services running in the farm
    Get-SPServiceInstance | Out-File C:\Scripts\SharepointConfig\Get-SPServiceInstance.txt

    #Retrieve information about InfoPath form services
    Get-SPInfoPathFormsService | Out-File C:\Scripts\SharepointConfig\Get-SPInfoPathFormsService.txt
    Get-SPInfoPathFormTemplate | Out-File C:\Scripts\SharepointConfig\Get-SPInfoPathFormTemplate.txt

    ##
    #WARNING: The following cmdlet requires run as administrator rights.
    Get-SPInfoPathUserAgent | Out-File C:\Scripts\SharepointConfig\Get-SPInfoPathUserAgent.txt

    #Retrieve information about common Web service settings
    Get-SPServiceHostConfig | Out-File C:\Scripts\SharepointConfig\Get-SPServiceHostConfig.txt

    ##
    ## Common service application settings
    ##

    #Access Services
    #Retrieve specific information for the Access Services service application
    Get-SPAccessServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPAccessServiceApplication.txt

    #Application Discovery and Load Balancer Service Application
    Get-SPTopologyServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPTopologyServiceApplication.txt
    Get-SPTopologyServiceApplicationProxy | Out-File C:\Scripts\SharepointConfig\Get-SPTopologyServiceApplicationProxy.txt

    #Business Data Connectivity Service
    #Retrieve information about data connection files.

    ##
    #WARNING: The following cmdlet requires run as administrator rights
    Get-SPDataConnectionFile | Out-File C:\Scripts\SharepointConfig\Get-SPDataConnectionFile.txt

    ##
    #WARNING: The following cmdlet requires run as administrator rights
    Get-SPDataConnectionFile | Get-SPDataConnectionFileDependent | Out-File C:\Scripts\SharepointConfig\Get-SPDataConnectionFileDependent.txt

    #Excel Services Application
    #Note: An Excel service application must be provisioned for the following cmdlets to succeed.
    Get-SPExcelServiceApplication | Get-SPExcelBlockedFileType | Out-File C:\Scripts\SharepointConfig\Get-SPExcelBlockedFileType.txt
    Get-SPExcelServiceApplication | Get-SPExcelDataConnectionLibrary | Out-File C:\Scripts\SharepointConfig\Get-SPExcelDataConnectionLibrary.txt
    Get-SPExcelServiceApplication | Get-SPExcelDataProvider | Out-File C:\Scripts\SharepointConfig\Get-SPExcelDataProvider.txt
    Get-SPExcelServiceApplication | Get-SPExcelFileLocation | Out-File C:\Scripts\SharepointConfig\Get-SPExcelFileLocation.txt
    Get-SPExcelServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPExcelServiceApplication.txt
    Get-SPExcelServiceApplication | Get-SPExcelUserDefinedFunction | Out-File C:\Scripts\SharepointConfig\Get-SPExcelUserDefinedFunction.txt
    Get-SPWebApplication | Get-SPInfoPathWebServiceProxy | Out-File C:\Scripts\SharepointConfig\Get-SPInfoPathWebServiceProxy.txt
    Get-SPWebApplication | Get-SPManagedPath | Out-File C:\Scripts\SharepointConfig\Get-SPManagedPath.txt

    #Managed Metadata Service
    #Note: A Managed Metadata service application must be provisioned for the following cmdlets to succeed.
    Get-SPServiceApplication | ?{$_.TypeName -eq “Managed Metadata Service”} | %{$id = $_.Id;Get-SPMetadataServiceApplication -Id $_ | Out-File C:\Scripts\SharepointConfig\Get-SPMetadataServiceApplication-$id.txt}
    Get-SPServiceApplicationProxy | ?{$_.TypeName -eq “Managed Metadata Service Connection”} | %{$id = $_.Id;Get-SPMetadataServiceApplicationProxy -Id $_ | Out-File C:\Scripts\SharepointConfig\Get-SPMetadataServiceApplicationProxy-$id.txt}
    Get-SPSite | Get-SPTaxonomySession | Out-File C:\Scripts\SharepointConfig\Get-SPTaxonomySession.txt

    #PerformancePoint Service Application
    #Note: A PerformancePoint service application must be provisioned for the following cmdlets to succeed.
    Get-SPPerformancePointServiceApplication | Get-SPPerformancePointSecureDataValues | Out-File C:\Scripts\SharepointConfig\Get-SPPerformancePointSecureDataValues.txt
    Get-SPPerformancePointServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPPerformancePointServiceApplication.txt
    Get-SPPerformancePointServiceApplication | Get-SPPerformancePointServiceApplicationTrustedLocation | Out-File C:\Scripts\SharepointConfig\Get-SPPerformancePointServiceApplicationTrustedLocation.txt

    #Search
    #Retrieve search information
    #Note: A Search service application must be provisioned for the following cmdlets to succeed.
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchAdministrationComponent | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchAdministrationComponent.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlContentSource | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlContentSource.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlCustomConnector | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlCustomConnector.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlDatabase | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlDatabase.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlExtension | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlExtension.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlMapping | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlMapping.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlRule | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlRule.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchCrawlTopology | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchCrawlTopology.txt
    $searchApp = Get-SPEnterpriseSearchServiceApplication;
    Get-SPEnterpriseSearchExtendedClickThroughExtractorJobDefinition -SearchApplication $searchApp | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchExtendedClickThroughExtractorJobDefinition.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchExtendedConnectorProperty | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchExtendedConnectorProperty.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchExtendedQueryProperty | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchExtendedQueryProperty.txt

    ##
    #WARNING: The following cmdlet generates a 120MB file that records the out of the box settings#
    ##
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchLanguageResourcePhrase | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchLanguageResourcePhrase.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataCategory | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchMetadataCategory.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataCrawledProperty | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchMetadataCrawledProperty.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataManagedProperty | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchMetadataManagedProperty.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchMetadataMapping | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchMetadataMapping.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchPropertyDatabase | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchPropertyDatabase.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryAuthority | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryAuthority.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryDemoted | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryDemoted.txt
    Get-SPEnterpriseSearchQueryAndSiteSettingsService | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryAndSiteSettingsService.txt
    Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance.txt
    Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy.txt
    Get-SPEnterpriseSearchService | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchService.txt
    Get-SPEnterpriseSearchServiceInstance | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchServiceInstance.txt
    Get-SPSearchService | Out-File C:\Scripts\SharepointConfig\Get-SPSearchService.txt
    Get-SPSearchServiceInstance | Out-File C:\Scripts\SharepointConfig\Get-SPSearchServiceInstance.txt

    ##
    #WARNING: The following cmdlet generates a file per site collection#
    ##
    Get-SPSite | %{$id = $_.Id;Get-SPEnterpriseSearchQueryKeyword -Site $_ | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryKeyword-$id.txt}
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryScope | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryScope.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryScope | Get-SPEnterpriseSearchQueryScopeRule | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryScopeRule.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQuerySuggestionCandidates | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQuerySuggestionCandidates.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchQueryTopology | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchQueryTopology.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchRankingModel | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchRankingModel.txt
    Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchSecurityTrimmer | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchSecurityTrimmer.txt
    Get-SPEnterpriseSearchServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchServiceApplication.txt
    Get-SPEnterpriseSearchServiceApplicationProxy | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchServiceApplicationProxy.txt
    Get-SPEnterpriseSearchSiteHitRule | Out-File C:\Scripts\SharepointConfig\Get-SPEnterpriseSearchSiteHitRule.txt

    #Security Token Service Application
    #Retrieve information about the security token service used for incoming SOAP messages.
    Get-SPSecurityTokenServiceConfig | Out-File C:\Scripts\SharepointConfig\Get-SPSecurityTokenServiceConfig.txt

    #State Service
    #Retrieve information about the State Service.
    Get-SPSessionStateService | Out-File C:\Scripts\SharepointConfig\Get-SPSessionStateService.txt
    Get-SPStateServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPStateServiceApplication.txt
    Get-SPStateServiceApplicationProxy | Out-File C:\Scripts\SharepointConfig\Get-SPStateServiceApplicationProxy.txt
    Get-SPStateServiceDatabase | Out-File C:\Scripts\SharepointConfig\Get-SPStateServiceDatabase.txt

    #Usage and Health data collection
    #Retrieve information about the Usage and Health Data Collection service application.
    Get-SPUsageApplication | Out-File C:\Scripts\SharepointConfig\Get-SPUsageApplication.txt
    Get-SPUsageDefinition | Out-File C:\Scripts\SharepointConfig\Get-SPUsageDefinition.txt
    Get-SPUsageService | Out-File C:\Scripts\SharepointConfig\Get-SPUsageService.txt

    #Visio Service
    #A Visio service application must be provisioned for the following cmdlets to succeed.
    Get-SPVisioServiceApplication | Get-SPVisioExternalData | Out-File C:\Scripts\SharepointConfig\Get-SPVisioExternalData.txt
    Get-SPVisioServiceApplication | Get-SPVisioPerformance | Out-File C:\Scripts\SharepointConfig\Get-SPVisioPerformance.txt
    Get-SPVisioServiceApplication | Get-SPVisioSafeDataProvider | Out-File C:\Scripts\SharepointConfig\Get-SPVisioSafeDataProvider.txt
    Get-SPVisioServiceApplication | Out-File C:\Scripts\SharepointConfig\Get-SPVisioServiceApplication.txt
    Get-SPVisioServiceApplicationProxy | Out-File C:\Scripts\SharepointConfig\Get-SPVisioServiceApplicationProxy.txt

    #Web Analytics Service Application
    #A Web Analytics service application must be provisioned for the following cmdlets to succeed.
    Get-SPServiceApplication | ?{$_.TypeName -eq “Web Analytics Service Application”} | %{$id = $_.Id;Get-SPWebAnalyticsServiceApplication -Id $_ | Out-File C:\Scripts\SharepointConfig\Get-SPWebAnalyticsServiceApplication-$id.txt}
    Get-SPServiceApplicationProxy | ?{$_.TypeName -eq “Web Analytics Service Application Proxy”} | %{$id = $_.Id;Get-SPWebAnalyticsServiceApplicationProxy -Id $_ | Out-File C:\Scripts\SharepointConfig\Get-SPWebAnalyticsServiceApplicationProxy-$id.txt}
    Get-SPWebApplication | Get-SPWebApplicationHttpThrottlingMonitor | Out-File C:\Scripts\SharepointConfig\Get-SPWebApplicationHttpThrottlingMonitor.txt
    Get-SPWebPartPack | Out-File C:\Scripts\SharepointConfig\Get-SPWebPartPack.txt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s