Netskope Help

Netskope Client Command Reference

This section lists various commands used in the installation of the Netskope Client.

Diagnostics Commands (Windows and macOS)

The diagnostics command is available via the nsdiag command in both Microsoft Windows and macOS devices. The command is located in the Client installation directory:

  • In Windows: C:\Program Files (x86)\netskope\stagent

    Example: C:\Program Files (x86)\netskope\stagent\nsdiag -n

  • In macOS: /Library/Application\ Support/Netskope/STAgent/

    Example:$ /Library/Application\ Support/Netskope/STAgent/nsdiag -n

Command example: nsdiag [options]


Command options are case-sensitive.

nsdiag -c start [-o <filename>.pcap] [-s <snap length>]
nsdiag -c stop
nsdiag -p start [-o <filename>.pcap] [-s <file size>]
nsdiag -p stop
nsdiag -d start [-o <filename>.log]
nsdiag -d stop
nsdiag -u
nsdiag -g upload -s [1mb | 10mb | 100mb]
nsdiag -g download -s [1mb | 10mb | 100mb]
nsdiag -l [debug | info | warning | error | critical]
nsdiag -n 
nsdiag [-h | -v]
Table 10. 

Command Option


-o <filename>.<extension>

Save logs and diagnostics to output a file.

-c start [-o <filename>.pcap] [-s <snap length>] | [stop]

Start or stop capturing inner packet dump. The pack dump can be written to <filename>.pcap specified via the -o command.

-p start [-o <filename>.pcap] [-s <file size>]

Start capturing outer packet dump to <filename>.pcap

-d start [-o <filename>.log]

Start capturing driver logs in <filename>.log

-o <filename>.<extension>

Output will be created in default directory: /Library/Logs/Netskope.

If filename is not specified than the default filename (nsouterpkt.pcap)will be used. The filename should NOT be a path as the output will always be created in the default directory.

-s <snap length>

If snap length is not specified, entire packet will be captured

-s <file size>

If file size is not specified, default file size will be 10 MB.

-c stop

Stop capturing inner packet dump

-p stop

Stop capturing outer packet dump

-d stop

Stop capturing driver logs.


Update configuration


Show this help


Show Netskope Client version

-g [upload | download] -s [1mb | 10mb | 100mb]

Perform Speed Test operation, supports [upload | download] operation. Supported payload size are 1mb, 10mb, 100mb and to be used with the -s option. File size is mandatory.

  • Upload test example: nsdiag -g upload -s 10mb

  • Download test example:nsdiag -g download -s 10mb

-l [debug | info | warning | error | critical]

Set the Netskope client log level


Get NPA status.

Example: $/Library/Application\ Support/Netskope/STAgent/nsdiag -n

NPA status is Connected.

Installation Command (Windows)

The MSIEXEC command is used to mass deploy Netskope Client (MSI packages) on Windows devices. This command is supported in the following Windows version:

  • Windows Desktop OS 10

  • Window 8.1, Windows 8 and ,

  • Windows 7

The format of MSIEXEC command:

msiexec /I NSClient.msi token=<token> host=<host> [mode=peruserconfig | installmode=IDP [userconfiglocation=<path>]] 
fail-close=[no-npa|all] [autoupdate=on|off] /l*v %PUBLIC%\nscinstall.log


Enter the command in a single line without any line-breaks.




Optional Command. Refers to normal installation type.Optional Command. Refers to normal installation type.


Optional parameter. Use peruserconfig when installing in a multi-user system.


Optional parameter. Use Idp value when provisioning users via IdP.


Specifies the user-specific directory used for storing the user configuration. It is recommended to use default value unless user's home directories are hosted on external file servers or network shares. This is recommended to be used only for the multi-user environment.

This is an optional parameter. By default the path is %AppData%\Netskope\STAgent.


The path can be an absolute path, a network share, or a path having environment variables.

  • To run the above from command prompt with environment variables, append '^' before '%'. For example: /I NSClient.msi mode=peruserconfig userconfiglocation=C:\Users\^%USERNAME^%\Netskope

  • To run the above command from a batch script with environment variables, append '%' before '%'. For example: /I NSClient.msi mode=peruserconfig userconfiglocation=C:\Users\%%USERNAME%%\Netskope

  • To run the above command from SCCM (or ) with environment variables, append '^' before '%' and prefix with "cmd /c". For example: cmd /c /I NSClient.msi mode=peruserconfig userconfiglocation=C:\Users\^%USERNAME^%\Netskope


Optional parameter. If fail-close is not present, the client will honor Web UI "fail close" client configuration.

  • all: Fail close will be applicable to CASB / Web traffic for the NPA tunnel too. Example: If the Netskope tunnel is not established, NPA's application traffic will also be blocked.

  • no-npa: Fail close will be applicable only for CASB / Web traffic but not for NPA tunnel.  Example: If the Netskope Tunnel is not established, NPA's application traffic will NOT be blocked.


  • on

  • off


Enter your organization ID here. To find your organization ID.

  1. Login to your Netskope Admin Console with admin credentials.

  2. Go to Settings > Security Cloud Platform > MDM Distribution.

  3. Locate your Organization ID under Create VPN Configuration section. The organization ID is case-sensitive.


Enter the addon URL of your tenant. For example: if your tenant URL is, then your addon URL is =


The log file path.


Use this option for silent installation.

Single Mode Installation
msiexec /I NSClient.msi [InstallMode=idP [tenant=<tenant-name> domain=<domain>]]

Example: msiexec /I NSClient.msi installmode=idP tenant=corp

  • If your tenant URL is, then, tenant = corp and domain =

  • If your tenant URL is, then, tenant = corp and

Multi-user Mode Installation
msiexec /I NSClient.msi installmode=idP tenant=<tenant-name> domain=<domain> mode=peruserconfig [userconfiglocation=<path>]

Example: msiexec /I NSClient.msi installmode=idP tenant=example mode=peruserconfig userconfiglocation=C:\Users\^%USERNAME^%\Netskope