2. Command Line Interface

The MetaDefender Client CLI can be run from the command line with the options as described in the table below.

The CLI executable is MetaDefender.exe found at the root of your installation directory.

Example:

C:\Program Files (x86)\MetaDefender Client\MetaDefender.exe <option>=<value> ...

Command Line Options

A list of available command line options is also available by running the MetaDefender Client executable from the command line without any options

Option

Value Types

Example(s)

Comments

server

<standard url>

-server=http://127.0.0.1:8008/

Specifies the URL of the MetaDefender server to be used

rule

String

-rule=Client

Specifies the MetaDefender security rule to process files

Note: Only applicable for MetaDefender v4

apikey

String

-apikey=13e5f8h4r3s

Specifies the MetaDefender apikey

Note: Only applicable for MetaDefender v3

workflow

String

-workflow=Client

Specifies the MetaDefender workflow profile to process files

Note: Only applicable for MetaDefender v3

verbose

n/a

-verbose

Enables verbose logging of scans.

user_agent

<val>

-user_agent=MDClient

Specifies the value of user_agent that will be provided to MetaDefender

cloud_api_key

String

-cloud_api_key=13e5f8h4r3s

Specifies the key to use with MetaDefender Cloud

scan_type

A list of one or more of the following strings

  • physical

  • system

  • removable

  • process

  • remote

-scan_type="system|process|physical|removable|remote"

-scan_type="process|physical|removable"

-scan_type=process

Indicates which type of scans MetaDefender Client should do

  • physical - all physical drives (excludes removable)

  • system - only system drives

  • removable - all removable media

  • process - only system processes

  • remote - network drives

Note: Any invalid parameters will be ignored with a warning

scan_location

"C:\somedir\|C:\somefile"

-scan_location="c:\somedir with space\|c:\somefile"

Specifies the location of the files and/or directories to be scanned

Note: A trailing \ is needed for directories

Note: invalid or malformed paths will be ignored

exclude_drive

E:|F:

-exclude_drive=E:|F:

Excludes from the scan

*Only drive letters supported currently

report_dir

Directory Path

-report_dir="%AppData%\logs\"

Specifies the location where scan logs should be saved. If this option is not specified no log file will be generated.

report_type

One or more of the following strings

  • pdf

  • txt

  • csv

-report_type=csv

Specifies which type of log file to write out at the end of scan.

Note: Defaults to txt if option is not specified or option is unavailable

max_file_size

<val>[GB|G|MB|M|KB|K]

-max_file_size=512KB

Specifies the maximum size of files for which MetaDefender Client will process with MetaDefender

Note: Any file greater than the max file size will display "Exceeded File Size"

hash_password

String

--hash_password 123qwe

Generates password hash for use in Central Management. See 2.1 Generating and using the Administrator Password for more information