How to: Use Rencore Farm Scanner

This article will explain how to install and run the Farm Scanner.

The Rencore Farm Scanner scans a Microsoft SharePoint farm and extracts customizations and configuration information which is used later in the further analysis.

The scan does not scan content of documents.

All SharePoint versions starting from SharePoint 2010 are supported.

The scan is querying 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.

Installation

The farm scan is executed by a PowerShell commandlet.

The download of the scanner consists of a small executable which copies the commandlet into the PowerShell modules folder of the current user.

After running the installation executable the commandlet is ready to be used with PowerShell as follows.

PS C:> Import-Module RencoreFarmAudit.psd1
PS C:> Start-RencoreFarmAudit -OutputFolder c:\pathtoyouroutputfolder

Running the scanner

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 e.g. about used webparts is available.

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.

By 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 scan 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.

-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

  1. The progress of the scan can be monitored in the PS command line as shown below.AIFS-KB_Use_605x136
  2. When setting the temp folder with parameter -TempFolder you can find a log file “mainscan.log in that folder which logs the processing.

    Options

    1. Include full usernames

    By default all user names are anonymized (as hash codes) to meet privacy regulations. Downside is that in the result information about Authors, ModifiedBy or CreatedBy for files are not readable. If usernames should be included use switch -IncludeFullUsernames as follows:

    Start-RencoreFarmAudit -OutputFolder C:\Temp\TempForFarmAudit -IncludeFullUsernames

    2. 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"
    3. 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.
    2. If content databases are skipped due to timeout increase DatabaseTimeout
      • If the scan skips a content database because of a timeout use parameter DatabaseTimeout to increase the default value of 90 minutes.
    3. If certain scanners fail to skip scanners with parameter SkipScanners
      • 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"