Run a task from command line

SharePoint Farm Reporter command line feature allows the user to instantiate a task from DOS command prompt anytime after a Power Reports task has been created using SharePoint Farm Reporter Power Reports task wizard.

To run a SharePoint Farm Reporter Power Reports task from command line: 

1.

Usage:
SharePointFarmReporterTaskRunner
<task name>

where,

SharePointFarmReporterTaskRunner

Name of the SharePoint Farm Reporter Task Runner application. Specify absolute path where the SharePointFarmReporterTaskRunner located.
For example:   C:\Program Files\SharePoint Farm Reporter\SharePointFarmReporterTaskRunner

task name

Name of the SharePoint Farm Reporter Power Reports task to be run from DOS command prompt. Enclose the task name in double quotes.
For example: "MySite Reports"

2. The Power Reports task will be reported in a new dialog as shown below:

 


3.

Once the task is completed, click Refresh button available in Task History pane in SharePoint Farm Reporter main application. A new entry will be added in Task History section, where you can view the report performed.

Examples of invoking an Power Reports task from the command prompt:

C:\Program Files\SharePoint Farm Reporter> SharePointFarmReporterTaskRunner "MySite Reports"

D:\>
"C:\Program Files\SharePoint Farm Reporter\SharePointFarmReporterTaskRunner" "MySite Reports"

DOS batch file examples:

  • To execute Power Reports tasks one by one from a batch file:

    "C:\Program Files\SharePoint Farm Reporter\SharePointFarmReporterTaskRunner" "MySite Reports"
    "C:\Program Files\SharePoint Farm Reporter\SharePointFarmReporterTaskRunner" "Sample List Reports"

  • To execute multiple Power Reports tasks simultaneously:

    start "cmd" "C:\Program Files\SharePoint Farm Reporter\SharePointFarmReporterTaskRunner" "MySite Reports"
    start "cmd" "C:\Program Files\SharePoint Farm Reporter\SharePointFarmReporterTaskRunner" "Sample List Reports"