Use > Data Flow Management > Universal Discovery > Inventory Discovery > Scanner Command Line Parameters

Scanner Command Line Parameters

Parameters that can be used to control the operation of the scanner and used to control which information is captured are as follows. These parameters are typically used in a command line interface to override parameter values that are contained in the scanner configuration file.

Note Most of these parameter corresponds to an option in the Scanner Generator wizard. For more information, see Scanner Generator Wizard.

Command Line Parameters for Scanners

Parameter Description
-? The full list of command line options can be obtained by running the scanners with the -? or /? command line option.
-force Do not check disk space when saving the scan file off-site. This may be useful when the operating system reports insufficient space, but this is actually due to access rights.
-incl:<switch>

Enables (or includes) certain types of information collected in a scan.For a list of options, see Scanner Information Type Parameters.

To include BIOS data and video data, include the following statement:

-incl:10 -incl:30
-excl:< switch >

Disables (or excludes) certain types of information collect in a scan.For a list of options, see Scanner Information Type Parameters.

To exclude BIOS data and video data, include the following statement:

-excl:10 -excl:30
-scandays:<Count>

Scan only if previous scan was more than Count days ago. Forces the scanner to perform the scan only if the previous scan was <Count> or more days ago.

For example:

-scandays:7

For example, if the scanner is launched from a login script every day, it will only perform the scan every week.

When the scandays:<Count> parameter is specified, the scanner attempts to check when the last scan was run. If no previous scan file is found, no messages are displayed and the scan runs. If a scan file is found, the following message is added to the log file:

"Checking the age of Scan File "%s"

Where %s is the full name of the scan file it checks. If there is a problem determining the age of the scan file (for example, if it is a newer version or it is corrupt), it then outputs:

The age of the Scan File cannot be determined.

If it does manage to obtain the date, it outputs:

Last scan was %d days ago

Where %d is an integer number.

-scandayofweek:<Number>

Scan only on specified day of week (0-Sun,1-Mon, etc.). <Number> can be one of the following:

0-Sunday
1-Monday
2-Tuesday
3-Wednesday
4-Thursday
5-Friday
6-Saturday

For example:

-scandayofweek:5

This will cause the scan to be performed on Fridays only. The scandays: and scandayofweek: options can be combined. For example:

Scanwin32-x86 -scandays:14 –scandayofweek:3

This causes the scan to be performed every other Wednesday.

-r:<path>

The default path to the original scan files. A UNC path can also be entered as the argument to this option. The format for a UNC path is:

\\servername\sharename\path\

For example:

Scanwin32-x86 -r:\\Micro Focus\ED\scanfiles\

Note The user that is running the scanner must have read permissions to the specified UNC path.

-p:<path>

Default off-site save path. The path can be one of the following types of values, depending on the destination of the scan file:

  • Normal file path - The full path name, beginning with the drive letter.

    For example:

    -p:c:\Inventory\Scans
  • UNC path - When running on Windows, a UNC path can be entered as the argument to this option. The format of a UNC path is:

     \\servername\sharename\path\

    For example:

    -p:\\DataFlowProbeServer\Incoming\
    

    The user running the scanner must have Write permissions to the specified path.

  • FTP/S URL - A destination URL of an FTP server. The format of the URL is:

    ftp://<username>:<password>@<hostname>
    :<port>/dir

    For example:

    -p:ftp://scanuser:scanpasswd@DataFlowProbeServer.
    mycompany.com/nm/scanner/uploadscans
  • HTTP/s URL - A destination URL of an HTTP server. The format of the URL is:

    http://<hostname>:<port>/dir

    For example:

    -p:http://DataFlowProbeserver.mycompany.com/nm/
    scanner/uploadscan

    The username and password is not supported here. If the username and password is required with HTTP saving, specify it in the Advanced Settings dialog in the Saving tab of the Scanner Generator. For detailed information, see Save result to network (off-site).

The scanners support URL encoding in usernames, passwords, and directory names. In a URL, you can replace @ with %40, and the scanner translates %40 to @ before it calls the FTP server. For example, if you type scanuser%40mycompany, the scanner will translate that as scanuser@mycompany when it logs in to the FTP server.

-cert

Specifies the path to the certificate file. This path is used with offsite scan saving when performed using the secure SSL-based protocol, such as ftps or https, to specify the certificate file (for self-signed certificates) or the file containing certificate authority files (for ftps/websites running with the regular certificate issued by a certificate authority). To obtain the file containing all recent certificate authorities extracted from the Mozilla browser, see: http://curl.haxx.se/docs/caextract.html

If the -cert command line option is not specified, the scanner still tries to save scan files using ftps/https, but without using any certificates.

-paths

Defines exactly which directories to scan; the parameter can be repeated as many times as necessary.

For example:

scan -paths:/etc -paths:/var -paths:/bin

scans just /etc, /var and /bin and their subdirectories.

Note You must ensure that the Allow scanner command line to override this selection option is checked in the Scanner Generator Software Data pagefor this to work.

-cfg Specifies the scanner configuration file.
-log:<level>

Specifies the level of debugging information that will be written to the scanner log when the scanner is running. The log is saved in the scan file and also as a separate file:

  • In most cases, you can view the scanner log by using the Viewer.
  • If a problem has occurred that prevents the scanner from saving the scan file, you can view the scanner log file from the Diagnostic panel in the Device Manager.

<level> can be one of the following:

  • off: Detailed logging is turned off. This is the default.

  • debug: Debug messages are logged in addition to the regular scanner messages. They are more-detailed providing additional information.

  • trace: All regular, debug, and detailed messages are logged. The detailed messages provide tracing details as to scan runs, returned error codes, and software scanning. This option automatically enables the generation of the error log file.

-scripts Specifies the path to a directory that contains pre/post scan scripts.
-scriptstimeout Specifies the timeout (in minutes) for running pre/post scan scripts.
-l:<filename> The default file name of the local scan file, local$.xsf. If the path is specified in the file name, then the default path for storing the local scan file is also overridden.
-v If set to on, the scanner does not make the local scan file read-only or hidden.
-d

Specifies whether delta scanning is enabled or not.

If set to on, this enables delta scanning if it is disabled in the scanner generator.

If set to off, this disables delta scanning if it is enabled in the scanner generator.

If the setting fails to specify on or off, the scanner prints the help message and returns.

-t:<path> The default path for storing temporary files.

-o:<filename>

Takes the off-site scan file name from the command line.

For example (non UNIX):

Scanwin32-x86 -o:r:\results\SC002154

Where r:\results\SC002154 is the path to the file SC002154.

If a file name is not entered, the file is named Default.xsf. If the path is not specified, the file is placed in the directory configured for off-site scan files in the Scanner Generator. If the path is specified on the command line (even if it is relative), it replaces the path configured in the Scanner Generator.

Example 1:

scanlinux-x86 -o:newname

Saves the off-site scan file, newname.xsf, to the location configured in the Scanner Generator.

Example 2:

scanlinux-x86 –o:/tmp/newname

Saves the off-site scan file to /tmp/newname.xsf.

Example 3:

scanlinux-x86 –o:subdir/newname

Saves the off-site scan file, newname.xsf, to the subdir subdirectory of the current directory.

-home Specifies the home path for storing aioptionrc files.
-pfiles

Overrides the setting for the pfiles command.

If set to on, this enables the use of the pfiles command.

If set to off, this disables the use of the pfiles command.

Related Topics Link IconRelated Information