This article will explain how to use our Farm scanner PowerShell Commandlet to create an inventory farm file to use with the Migration tool.
Note: The scan must run on a machine that is part of a SharePoint farm. It is recommended to run the scan on a SharePoint Web Frontend because on a WFE more information about used webparts is available.
Caution: We only recommend admin's to use the Farm Scanner PowerShell Commandlet when they want to run a scan with more configurations than what is available via the Farm Scanner Client Application.
The Rencore Farm Scanner scans a Microsoft SharePoint farm and extracts customizations and configuration information which is used later in further analysis.
The scan does not scan the content of documents.
All SharePoint versions starting from SharePoint 2010 are supported.
The scan queries the SharePoint content databases and uses the SharePoint object model for further information.
The data is stored in SQLite databases which are zipped (with extension “.spinventory”) and password encrypted at the end. These “.spinventory” files are later used for further analysis, e.g. to find migration blockers or security issues.
Important: The scan can take several days, depending on the amount and size of the content databases. The scanner tries to have a low impact on the SharePoint database and pauses if it notices a high load on the farm.
It is recommended to run the scan as a scheduled task because in this case no RDP connection is needed, and the scan can run as long as it takes.
If you run the scan via Remote desktop (RDP session) please ensure that the session keeps open and alive during the scan. If the session is closed e.g. due to connectivity issues or due to group policy the scan will not finish.
Parameters
Parameter | Requirement | Description |
-OutputFolder |
Required |
Absolute path to a folder for the result files. |
-TempFolder |
Optional |
Absolute path to a folder for temporary data. If the parameter is not provided the system temp folder is used. |
-OutputFilename |
Optional |
Name of the result file. (e.g. “FarmInventory_EMEA.spinventory”) |
-IncludeFullUsernames |
Optional |
Default: FALSE (usernames are not readable in the result) |
-ChunkSize |
Optional |
Defines how many content databases are scanned in a chunk. For each chunk, a result file (.spinventory) is created. Default: The scan does not happen in chunks. |
-SkipDatabasesCount |
Optional |
If the scan in chunks stopped due to a system error this argument defines how many content databases should be skipped during the scan, to continue a stopped scan. |
-DatabaseTimeout |
Optional |
Be default the scanner scans a single database for 90 minutes and then continues with the next content database. |
-Databases |
Optional |
List of content databases for the scan. In case a previous scan failed for a single content database this parameter allows setting the name of the content databases for the scan. |
-IgnoreWsps |
Optional |
List of farm solutions (WSP) which should not be scanned. |
-SkipScanners |
Optional |
List of scanners that should not be applied. E.g. in case a specific scanner fails this parameter allows skipping this scanner to complete the scan. The list is shown in the troubleshooting below. |
-Force |
Optional |
The scanner often needs several GB available for the data. Therefore the scanner checks at the beginning how much space is available in the temp folder and in the output folder. If disk space is not sufficient the scanner will not run. To override this behavior use the switch -Force. |
Starting a scan
The following call of the PS commandlet scans the SharePoint farm in chunks of 5 content databases, with an increased timeout per database because the content databases are expected to be large.
Start-RencoreFarmAudit -OutputFolder C:\Temp\default -ChunkSize 5 -DatabaseTimeout 240
Monitoring the scan
- The progress of the scan can be monitored in the PS command line as shown below.
- When setting the temp folder with parameter -TempFolder you can find a log file “mainscan.log” in that folder which logs the processing.
Additional Options
Below is a list of popular options to run the scanner:
- Include full usernames
By default, all user names are anonymized (as hash codes) to meet privacy regulations. The downside is that in the result information about Authors, ModifiedBy or CreatedBy for files is not readable. If usernames should be included use switch -IncludeFullUsernames as follows:Start-RencoreFarmAudit -OutputFolder C:\Temp\TempForFarmAudit -IncludeFullUsernames
- Ignore specific farm solutions
Sometimes specific farm solutions should not be extracted, e.g. because of security concerns. To skip such farm solutions, specify the names of these solutions in parameter -IgnoreWsps as comma-separated strings. Wildcards are allowed in the name.Start-RencoreFarmAudit -OutputFolder C:\Temp\TempForFarmAudit -IgnoreWsps "companyname.*.wsp","Nintex*.wsp"
- Only analyze specific content databases
If the scan should be limited to a certain content database only, or if a previous scan failed for a single content database this parameter allows setting the name of the content databases for the scan.Start-RencoreFarmAudit -OutputFolder C:\Temp\TempForFarmAudit -Databases "DatabaseContent01","DatabaseContent02","DatabaseContent03"
Troubleshooting
1. Check your RDP session-
- If you run the scan via a remote desktop session, please ensure this session is running during the full run of the scan. If the RDP session is closed the scan will stop.
-
- If the scan skips a content database because of a timeout use parameter DatabaseTimeout to increase the default value of 90 minutes.
-
- If the scan fails regularly in a specific scanner use the parameter SkipScanners to skip this scanner. The following scanners are running and could be skipped.
- "AppPackages"
- "BDC"
- "ContentTypeFieldReferences"
- "ContentTypeUsage"
- "CustomActions"
- "CustomizedFiles"
- "EventReceivers"
- "FarmFeatures"
- "Features"
- "HealthReports"
- "Lists"
- "SandboxedSolutions"
- "Servers"
- "ServiceApplications"
- "SiteMaps"
- "Sites"
- "Solutions"
- "WebApplications"
- "WebParts"
- "Webs"
- "WebTemplates"
- "WorkflowAssociations"
- "Workflows"
- If the scan fails regularly in a specific scanner use the parameter SkipScanners to skip this scanner. The following scanners are running and could be skipped.