Silent command prompt install of Windows agent or probe
You can use command line syntax to install a Windows agent or probe. A silent install is a non-intrusive method of installing the agent software on devices. That is, there are no messages or windows displayed to the user during the installation. This also ensures that the correct settings are applied to all devices.
Customer-specific installation programs already contain preset parameters and so the only parameter that can be used from the command line is /silent
to indicate a silent installation. As a result, we recommend that you should start customer-specific installation programs from the N-able N-central UI rather than from the command prompt.
Due to the restrictions placed by Windows installation software and InstallShield, special characters are not supported on the command line. User name and password parameters must only contain alphanumeric characters. Do not use spaces, a backslash (\), quotation marks ("), or other special characters in the parameters of an installation command.
Syntax
When writing an installation command, parameters can be sent to both the Windows installation software and the InstallShield application. In the case of a silent installation, parameters must be sent to both.
InstallShield Command Parameters | Details |
---|---|
/silent
|
Indicates a silent installation to the InstallShield application. |
/v
|
Directs values to the Windows installation software. These must be contained within quotation marks. Spaces must be inserted after the first quotation mark and before the last quotation mark. This indicates the separation of parameters within the command. |
Windows install parameter switches
Windows Install Parameters | Details |
---|---|
/qn | Indicates a silent installation to the Windows installation software. |
/L*v LOG_FILE_NAME | Logs all installer messages into the specified file (LOG_FILE_NAME). |
AGENTACTIVATIONKEY |
The key generated by N-able N-central that is required in order to install generic system agent software. If the AGENTACTIVATIONKEY parameter is used in an installation command, you do not need to use the CUSTOMERID, CUSTOMERNAME or REGISTRATION_TOKEN parameters. Similarly, if the CUSTOMERID, CUSTOMERNAME and REGISTRATION_TOKEN parameters are used in an installation command, you do not need to use the AGENTACTIVATIONKEY parameter. |
AGENTPROXY (optional) |
The information required if a proxy server is used. The proxy string must be provided in one of the following formats:
|
CUSTOMERID | The numeric identifier of the customer on the device where you are installing the agent or probe. |
CUSTOMERNAME |
The name of the customer device where you are installing the probe. CUSTOMERNAME is an optional parameter when you use the parameter CUSTOMERSPECIFIC=1 in the command line. If used in an installation command, the CUSTOMERID and CUSTOMERNAME parameters must both be included together. If the customer name includes a space, the name must be enclosed with |
CUSTOMERSPECIFIC |
Identifies a N-able N-central generated agent or probe installer for a customer. 1= installer generated for a specific customer 0= generic installer not specific to a customer |
REGISTRATION_TOKEN | The registration token (string) credentials for agent self-registration. For more information, see Registration tokens for agent installation. |
SERVERPROTOCOL | Identifies the protocol that the probe will use to communicate with the central server as one of HTTP or HTTPS. |
SERVERADDRESS | The IP address or FQDN of the central server. |
SERVERPORT |
The numeric port number that the probe will use to communicate with the central server. For example, 80 for HTTP or 443 for HTTPS. If used in an installation command, the SERVERPROTOCOL, SERVERADDRESS, and SERVERPORT parameters must all be included together. |
PROBETYPE |
Identifies the type of probe to be installed as one of:
For the Network_Windows probe type, include the AGENTDOMAIN, AGENTUSERNAME, and AGENTPASSWORD parameters. For the Workgroup_Windows probe type, include only the AGENTUSERNAME and AGENTPASSWORD parameters must all be included together. This parameter is only used for Windows probes and not for Windows agents. |
AGENTDOMAIN | The domain of the user account that will access the probe. This parameter is only used for Windows probes and not for Windows agents. |
AGENTUSERNAME | The user name of the user account that will access the probe.This parameter is only used for Windows probes and not for Windows agents. |
AGENTPASSWORD | The password of the user account that will access the probe. This parameter is only used for Windows probes and not for Windows agents. |
Command prompt examples
Installation commands can use either customer identification or activation keys as shown in the following examples:
Windows Command Shell examples
WindowsProbeSetup.exe /silent /v" /qn CUSTOMERID=<customer ID> CUSTOMERNAME=<customer name> REGISTRATION_TOKEN=<registration token> SERVERPROTOCOL=<protocol> SERVERADDRESS=<server address> SERVERPORT=<port number> PROBETYPE=<type of probe> AGENTDOMAIN=<domain name> AGENTUSERNAME=<user name> AGENTPASSWORD=<user password> "
WindowsAgentSetup.exe /silent /v" /qn CUSTOMERID=<customer ID> CUSTOMERNAME=<customer name> REGISTRATION_TOKEN=<registration token> SERVERPROTOCOL=<protocol> SERVERADDRESS=<server address> SERVERPORT=<port number> "
WindowsProbeSetup.exe /silent /v" /qn AGENTACTIVATIONKEY=<key> "
WindowsAgentSetup.exe /silent /v" /qn AGENTACTIVATIONKEY=<key> "
WindowsAgentSetup.exe /silent /v" /qn CUSTOMERID=<customer_id> CUSTOMERSPECIFIC=1 REGISTRATION_TOKEN=token_guid SERVERPROTOCOL=HTTPS SERVERADDRESS=<server_ip> SERVERPORT=443 "
PowerShell example
PS C:\TEMP> .WindowsProbeSetup.exe '/s /v"/qn CUSTOMERID=$customerID CUSTOMERSPECIFIC=1 REGISTRATION_TOKEN=$registrationToken SERVERPROTOCOL=$serverProtocol SERVERADDRESS=$serverAddress SERVERPORT=$serverPort" '
Function Install-Nable {
[CmdletBinding()]
param ()
try {
if (-not (Test-Path "C:\temp")) {
New-Item -ItemType Directory -Path "C:\temp"
}
Write-Verbose "Downloading N-able Windows Agent setup."
$setupFile = "C:\temp\WindowsAgentSetup.exe"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://rmm.domain.org/download/2023.3.0.13/winnt/N-central/WindowsAgentSetup.exe -OutFile $setupFile
Write-Verbose "Download complete."
# Write-Verbose "Waiting 180 seconds."
# Start-Sleep -Seconds 180
Write-Verbose "Running N-able Windows Agent setup."
$arguments = @(
'/s',
'/v"',
'/qn',
'CUSTOMERID=103',
'CUSTOMERSPECIFIC=1',
'REGISTRATION_TOKEN=acxde-12-T3st-6d88-9671-123456789101',
'SERVERPROTOCOL=HTTPS',
'SERVERADDRESS=pm-4.n-able.com',
'SERVERPORT=443"'
)
Start-Process $setupFile -ArgumentList $arguments -Wait -WindowStyle Hidden
Write-Verbose "Installation complete."
}
catch {
Write-Error "An error occurred while installing N-able Windows Agent: $_"
}
}