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]
Important
Command options are case-sensitive.
The -f, -m, and -r options are available only from version 90.
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] nsdiag -m nsdiag -r nsdiag -f
Command Option | Description |
---|---|
-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> | The output will be created in the default directory: /Library/Logs/Netskope. If the filename is not specified then 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, the entire packet will be captured |
-s <file size> | If the file size is not specified, the 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. |
-u | Update configuration |
-h | Show this help |
-v | 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.
|
-l [debug | info | warning | error | critical] | Set the Netskope client log level |
-n | Get NPA status. Example: $/Library/Application\ Support/Netskope/STAgent/nsdiag -n NPA status is Connected. |
| This option shows URL performance stats like connect time, look-up time etc as shown below. ./nsdiag -r www.google.com NameLookupTime: 0.1 ConnectTime: 0.2 AppConnectTime: 0.0 PretransferTime: 0.2 StarttransferTime: 0.7 TotalTime: 0.9 RedirectTime: 0.0 DownloadSpeed: 19669 bytes/sec |
| Use this option to change the default size of the log file. The default size is 5 MB, using this command you can specify the log file size upto 1 GB. Usage: nsdiag -m <filesize> e.g nsdiag -m 5 This will change the nsdebug.log file to 5 MB. |
| Use this command to display the client details such as client status, tunnel status, Gateway, On-PremStatus, Gateway IP, Tunnel Protocol, Explicit Proxy. >.\nsdiag.exe -f Tunnel status:: NSTUNNEL_CONNECTING. Client status:: enable. Gateway:: gateway-mycorp.goskope.com. OnPremDetection:: On-Premises. Explicit Proxy:: false. Gateway IP:: 198.168.1.1. Tunnel Protocol:: TLS. |
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
Note
Enter the command in a single line without any line-breaks.
Parameter | Description |
---|---|
/i | Optional Command. Refers to normal installation type. |
mode | Optional parameter. Use |
installmode | Optional parameter. Use |
userconfiglocation | 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. NoteThe path can be an absolute path, a network share, or a path having environment variables.
|
fail-close | Optional parameter. If fail-close is not present, the client will honor Web UI "fail close" client configuration.
|
autoupdate |
|
token | Enter your organization ID here. To find your organization ID.
|
host | Enter the addon URL of your tenant. For example: if your tenant URL is corp.example.com, then your addon URL is = addon-corp.example.com |
/l*v | The log file path. |
/qn | Use this option for silent installation. |
Note
The /j
option is not supported while using the msiexec
command for Netskope Client installation.
Single Mode Installation
msiexec /I NSClient.msi [InstallMode=idP [tenant=<tenant-name> domain=<domain>]]
Example: msiexec /I NSClient.msi installmode=idP tenant=corp domain=eu.example.com
If your tenant URL is corp.example.com, then, tenant = corp and domain = example.com
If your tenant URL is corp.eu.example.com, then, tenant = corp and domain=eu.example.com
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 domain=eu.goskope.com mode=peruserconfig userconfiglocation=C:\Users\^%USERNAME^%\Netskope