Registry Keys
Registry Keys
Configuration options for PowerShell Server are stored in the Windows registry in HKEY_LOCAL_MACHINE\SOFTWARE\nsoftware\PowerShellServer. The following values can be configured:
Name | Type | Description | ||||||||||||||||||||||||||||||
AdminServicePort | DWORD | Port to be used for administrative service connection. The default value is 8122. | ||||||||||||||||||||||||||||||
AdminServiceUsername | String | Username for administrative service connection. The default value is randomly generated during setup. | ||||||||||||||||||||||||||||||
AdminServicePassword | String | Password for administrative service connection. The default value is randomly generated during setup. | ||||||||||||||||||||||||||||||
AdminLocalOnly | DWORD | Restricts access to the SSH administration service to the local machine. The default is 1 (True). If set to 0 (False), connections are allowed from outside the local machine. The user must still authenticate using AdminServiceUsername and AdminServicePassword. Refer to Sessions for more information. | ||||||||||||||||||||||||||||||
AdminClientRetryCount | DWORD | Specifies the number of attempts to connect to the SSH administration service from the UI before failing. The default is 3. This should never need to be adjusted. | ||||||||||||||||||||||||||||||
AdminClientRetryDelay | DWORD | The delay between retry attempts to connect to the SSH administration service from the UI. The value is in milliseconds and the default is 1000. This should never need to be adjusted. | ||||||||||||||||||||||||||||||
AdminServiceEnabled | DWORD | This setting may be set to enable SSH administrative functions when running as a standalone application (not as a Windows service).
By default the SSH administration service will only be enabled when running as a Windows service. Set this value to 1 (True)
to enable the SSH administration service at all times (whether running as a Windows service or not). The benefit of enabling
this is to allow administration of the server via command line parameters.
When enabled the following command line parameters may be used to manage the standalone server (not running as a Windows service).
| ||||||||||||||||||||||||||||||
AuthMaxAttempts | DWORD | Specifies the maximum number of connection retries allowed from a client with invalid login credentials. By default this value is set to 3. | ||||||||||||||||||||||||||||||
AuthorizedKeys | Key | This key can be set with public key String values in order authorize access to PowerShell Server. The name of the String value is not used, but it is recommended to set this to the name of the user that the public key corresponds to for organizational purposes. In order for this configuration setting to be used, the server must be set to use File Based Public Key Authentication. If this key exists in the registry, its values will be used, otherwise the file specified in the GUI will be used. | ||||||||||||||||||||||||||||||
Banner | String | This is the value of the Login Banner message. | ||||||||||||||||||||||||||||||
DeleteLogDays | DWORD | The number of days after which old log files will be deleted. This is only applicable when RotateLogDays is set to a positive value. | ||||||||||||||||||||||||||||||
EnableCompression | DWORD | Can be used to enable use of the zlib compression algorithm on SSH connections.
0 - Off: No compression will be used (Default). 1 - On: Zlib compression will be enabled, if requested by the SSH client. | ||||||||||||||||||||||||||||||
EnableSCP | DWORD | Can be used to enable SCP support.
0 - Off (default) 1 - On | ||||||||||||||||||||||||||||||
EnableSessionManagement | DWORD | Can be used to enable sessions management.
0 - Off 1 - On (default) | ||||||||||||||||||||||||||||||
EnableSexec | DWORD | Can be used to disable SExec connections
0 - Off 1 - On (default) | ||||||||||||||||||||||||||||||
EnableShell | DWORD | Can be used to disable Shell connections.
0 - Off 1 - On (default) | ||||||||||||||||||||||||||||||
EnableSFTP | DWORD | Can be used to enable SFTP support.
0 - Off (default) 1 - On | ||||||||||||||||||||||||||||||
EnableSSHReverseTunnel | DWORD | Can be used to enable SSH Reverse Tunnel support.
0 - Off (default) 1 - On | ||||||||||||||||||||||||||||||
EnableSSHTunnel | DWORD | Can be used to enable SSH Tunnel support.
0 - Off (default) 1 - On | ||||||||||||||||||||||||||||||
EnableWebServer | DWORD | Can be used to enable the PowerShellASP Web Server.
0 - Off (default) 1 - On | ||||||||||||||||||||||||||||||
ExecShellId | String | The ID given to the PowerShell Host Shell for SExec sessions. By default this will be nsoftware.PSExec. | ||||||||||||||||||||||||||||||
FirewallType | DWORD | The type of firewall for the SSH Tunnel to connect through. Applicable values include the following:
0 - No firewall (default setting) 1 - Connect through a tunneling proxy. 2 - Connect through a SOCKS4 proxy. 3 - Connect through a SOCKS5 proxy. | ||||||||||||||||||||||||||||||
FirewallHost | String | The name of IP address of the firewall that the SSH Tunnel will connect through. | ||||||||||||||||||||||||||||||
FirewallPort | DWORD | The TCP port for the FirewallHost | ||||||||||||||||||||||||||||||
FirewallUser | String | A user name if authentication is to be used when connecting through a firewall. | ||||||||||||||||||||||||||||||
FirewallPassword | String | Password to be used if authentication is to be used when connecting through a firewall. | ||||||||||||||||||||||||||||||
GSSAPIAuthEnabled | DWORD | Specifies if GSS-API authentication is accepted.
0 - Off 1 - On (default) | ||||||||||||||||||||||||||||||
GSSAPIMechanisms | DWORD | Used to set the allowable GSS-API authentication mechanisms.
0 - All 1 - Kerberos 2 - NTLM (default) | ||||||||||||||||||||||||||||||
IdleSessionTimeout | DWORD | The number of minutes after which an idle connection should be terminated. | ||||||||||||||||||||||||||||||
InteractiveShellId | String | The ID given to the PowerShell Host Shell for interactive sessions. By default this will be nsoftware.PowerShell. | ||||||||||||||||||||||||||||||
IsolatedSessions | DWORD | Controls whether isolated sessions will be used when PowerShell Server is running as a service.
0 - Off: PowerShell will impersonate the logged in user (if NoImpersonation is off). 1 - On: The PowerShell Runspace will run from the logged in user account.(default) Note that this is only applicable when PowerShell Server is running as a service. | ||||||||||||||||||||||||||||||
KerberosSPN | String | The Service Principal Name for the Kerberos Domain Controller. If the Service Principal Name cannot be automatically determined, it should be set here. This will usually be in the form "host/fqdn.of.sshhost[@REALM]" where REALM is the fully qualified (DNS) name of the kerberos realm (or Windows Active Directory domain name). | ||||||||||||||||||||||||||||||
LocalHost | String | The local IP address of the interface to which the server will bind. By default the server will listen on the default interface for the system. | ||||||||||||||||||||||||||||||
LogSSHPackets | DWORD | Specifies whether or not raw SSH packets are included in the log.
0 - Off (default) 1 - On | ||||||||||||||||||||||||||||||
LogToFile | String | The full path to the log file. | ||||||||||||||||||||||||||||||
MatchSSHPublicKeyToUsername | DWORD | Controls whether public keys are tied to a specified user name. This is only applicable when using file based
public key authentication. Possible values are:
0 - Off: Public keys are not tied to a specific username (Default). 1 - On: Public keys are tied to a specific username. By default when a user authenticates using public key authentication the server will check the key presented by the user against the list of keys in the specified file. If the key is found the authentication succeeds. This setting allows you to validate that the user presents both the expected key and username during authentication. If this setting is enabled the server will check the comment of the public key specified in the file and match it to the username provided during authentication. This check is not case sensitive. To specify a username to be associated with a specific key, include the username in place of the comments in the public key. For instance: Unmodified public key:
ssh-rsa AAAAB3NzaC1yc2EA...rPFBe7Pnc= rsa-key-20110822Public key modified to be associated with a specific username: ssh-rsa AAAAB3NzaC1yc2EA...rPFBe7Pnc= DOMAIN\Username | ||||||||||||||||||||||||||||||
MaxConnections | DWORD | Specifies the maximum number of connections that are allowed. By default the number of allowed connections is determined by the license that is installed. This setting may be specified to further restrict the number of connections. The server will restrict the number of connections to whichever is the lesser value between this setting and the number of allowed connections for the license. | ||||||||||||||||||||||||||||||
MaxNumRowsInLog | DWORD | Controls how many lines will be shown in the Status window in the Service tab of the Powershell Server User Interface. If this value is exceeded, the oldest lines will be removed as new lines are added. The default value is 1000. | ||||||||||||||||||||||||||||||
NoImpersonation | DWORD | Can be used to disable impersonation of the username used in the connection.
0 - Off: Clients will be impersonated (Default). 1 - On: Clients will not be impersonated. | ||||||||||||||||||||||||||||||
PasswordAuthEnabled | DWORD | May be set to disable password authentication. This is enabled by default.
0 - Off: Password authentication is not allowed. 1 - On: Password authentication is enabled (Default). | ||||||||||||||||||||||||||||||
PreserveFileTime | DWORD | Determines if filetime preservation is supported. If a client requests filetime preservation (typically
by setting a "-p" parameter) this setting controls whether or not it is respected.
0 - Off: Filetime preservation options are ignored. 1 - On: Filetime preservation is supported (Default). | ||||||||||||||||||||||||||||||
PromptForRegPermissions | DWORD | When the server is running under an account that does not have write permissions to the registry location
where these settings are stored the user will be prompted to change the permissions. If this value is set to
0 the user will not be prompted again. Possible values are:
0 - Off: The user will not be prompted to modify registry permissions. 1 - On: The user is prompted to modify registry permissions when needed (Default). | ||||||||||||||||||||||||||||||
PSTraceLevel | DWORD | Controls the trace level of the logging from the application. Can be
one of the following values:
0 - Off: Nothing is logged. 1 - Error: Only errors are logged. 2 - Warning: Errors and warnings are logged. 3 - Info: Errors, warnings and informational messages are logged (default value). 4 - Verbose: All messages, including those useful for debugging and troubleshooting are logged. | ||||||||||||||||||||||||||||||
PubKeyAuthEnabled | DWORD | Controls if the server will allow clients to authenticate using Public Keys:
0 - Off: No public key authentication; clients can only connect using a password. 1 - On: Public key authentication requests will be accepted. | ||||||||||||||||||||||||||||||
PubKeyAuthCertStoreType | DWORD | Specifies the type of certificate store where the allowed public keys can be found.
0 - User: Use the User certificate store. 1 - Machine: Use the Machine certificate store. | ||||||||||||||||||||||||||||||
PubKeyAuthCertStore | String | Specifies the certificate store where the allowed public keys can be found. | ||||||||||||||||||||||||||||||
ReverseTunnelPortMap | String | A map defining port ranges to be used by specific users when opening a reverse tunnel.
By default when this setting is unspecified any user may request any port to be opened when opening a reverse tunnel.
If this setting is specified the server will restrict the port ranges on a per-user basis to the ranges
defined here. The value should be a semicolon separate list of username and port range pairs in the format:
DOMAIN\user1=5000-5500;DOMAIN\user2=4444The port range may either be a single port, or a range like "5000-5500". If no range is defined for a user the reverse tunnel request will be reject. | ||||||||||||||||||||||||||||||
RotateLogDays | DWORD | The number of days after which the log file will be rotated. Old log files will be renamed to the format "logname-yyyy-MM-dd". When set to a positive value DeleteLogDays is applicable. | ||||||||||||||||||||||||||||||
RunAsAService | DWORD | Indicates if the server needs to be executed as a windows service (1) or in-process inside the PowerShell User Interface (0). | ||||||||||||||||||||||||||||||
RunProfiles | DWORD | Controls if the server will run profile scripts.:
0 - Off: No profile scripts will execute. 1 - On: Any profile scripts found will be executed. | ||||||||||||||||||||||||||||||
SCPDefaultDir | String | The absolute path to the default directory for SCP users. By default the SFTPRootDir will be used. | ||||||||||||||||||||||||||||||
SecurityGroup | String | Name of the Windows group used to control access. | ||||||||||||||||||||||||||||||
ServerSSHVersionString | String | This setting specifies the version string value that is sent to all connecting clients. This may be set to specify server specific information. When setting a custom value, it must contain "SSH-2.0-" as this is a standard format that specifies the supported SSH version. | ||||||||||||||||||||||||||||||
SFTPHomeDirMap | String | A map defining user specific SFTP home directories. By default all users are placed into SFTPRootDir when logging on. This setting
allows for a user to be assigned a specific directory. The value should be a semicolon separate list of username and home directory pairs in the format:
DOMAIN\user1=C:\user1;DOMAIN\user2=C:\user2The user value must include the domain or machine name as appropriate (DOMAIN\user1 or MACHINE\user1). If the directory specified does not exist the user will be placed into the default SFTPRootDir. If a user connects and no mapping is present for that user they will be placed into the default SFTPRootDir. | ||||||||||||||||||||||||||||||
SFTPRootDir | String | The absolute path to the root directory for SFTP users. By default the "windir" environment variable
will be used to determine the root directory (typically "C:\").
The special value "$user" may be included in the path which will be resolved to the username of the authenticated user (without Domain or Machine information). When "$user" is included in the path if the directory does not exist it will be automatically created. | ||||||||||||||||||||||||||||||
SSHCertSubject | String | Subject of the SSL certificate used by the server. Example: "CN=NEWTON". | ||||||||||||||||||||||||||||||
SSHStoreType | DWORD | Indicates where to find the SSL certificate. Can be one of the
following values:
0 - User store 1 - Machine Store 2 - PFX File 4 - PEM File | ||||||||||||||||||||||||||||||
SSHStore | String | If SSHStoreType is either 0 or 1, the SSHStore value defines the specific store where the certificate can be found. Possible values include: My, Root, Trust, CA, TrustedPublisher, Disallowed, AuthRoot, TrustedPeople. | ||||||||||||||||||||||||||||||
SSHStorePassword | String | The password for the specified certificate store. | ||||||||||||||||||||||||||||||
SSHEncryptionAlgorithms | String | Specifies the allowed SSH Encryption Algorithms in a comma-delimited list.
During the SSH handshake, this list will be used to negotiate the encryption
algorithm to be used between the client and server. This list is used for both
directions: client to server and server to client. When negotiating algorithms,
each side sends a list of all algorithms it supports or allows. The algorithm
chosen for each direction is the first algorithm to appear in the sender's list
that the receiver supports, so it is important to list multiple algorithms in
preferential order. If no algorithm can be agreed upon, the component will raise
an error and the connection will be aborted. Valid values are:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,arcfour256,arcfour128,arcfour,cast128-cbc,aes256-gcm@openssh.com,aes128-gcm@openssh.com | ||||||||||||||||||||||||||||||
SSHMacAlgorithms | String | This may be used to specify an alternate list of supported Mac algorithms used during
SSH negotiation. This also specifies the order in which the Mac algorithms are preferred.
The value should contain a comma separate list of algorithms. Supported algorithms are:
hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96 hmac-sha2-256 The default is: hmac-sha1,hmac-md5,hmac-sha1-96,hmac-md5-96 | ||||||||||||||||||||||||||||||
SSHPort | DWORD | The TCP port the server will listen in for connections. | ||||||||||||||||||||||||||||||
SSHPublicKeyEnable | DWORD | Controls if file based public key authentication is enabled or not. This depends on PubKeyAuthEnabled being set as well. The file to use is contained in the SSHPublicKeyFileName setting.
0 - Off: Windows store based public key authentication will be used. (default) 1 - On: File based public key authentication will be used. | ||||||||||||||||||||||||||||||
SSHPublicKeyFileName | String | The key file to use for file based public key authentication. Note that the file path indicated may contain the %USERNAME% macro, which will resolve to the name of the user being authenticated. | ||||||||||||||||||||||||||||||
SupportedTerminals | String | Maps client terminal identification strings to the type of
interactive terminal offered by Powershell Server (VT100, Dumb terminal).
This should be a string with the following format:
"<idstring>=vt100|dummy,<idstring>=vt100|dummy...".
For example, to map any client with a terminal identification string beginning with VT to the VT100+ emulation, you can configure this as:
"vt*=vt100"
Any id string not found here will always get the "dumb" terminal by default. The default configuration for this option is:
"vt*=vt100,xterm=vt100" | ||||||||||||||||||||||||||||||
SvcLogFile | String | If present, the trace information generated by the server will be written to the specified file. | ||||||||||||||||||||||||||||||
SyslogDaemonHost | String | When running as a Windows service the SSH process will send log messages to the UI process. These are the messages which are logged in the Service tab. By default this communication happens on the loopback adapter of the system. If you wish to send these log messages to a different host instead of the UI process you may set this to the hostname or IP address of the destination to which the Syslog messages will be sent. Syslog facility 23 is used to identify messages from PowerShell Server and filter out any other syslog traffic. | ||||||||||||||||||||||||||||||
SyslogDaemonPort | DWORD | When running as a Windows service the SSH process will send log messages to the UI process. These are the messages which are logged in the Service tab. By default this communication happens on the loopback adapter of the system on port 514. If this port is in use or you wish to use a different port you may specify this here. This specifies the port on which the UI process will listen for incoming log messages and also the port from which the log messages are sent from the SSH process. | ||||||||||||||||||||||||||||||
UseFIPSCompliantAPI | DWORD | Determines if only FIPS compliant algorithms and API calls are made during SSH or SSL sessions. This is false by default. Possible values:
0 - Off: Non-FIPS compliant algorithms are allowed (default). 1 - On: Only FIPS compliant algorithms are allowed, and cryptographic calls are made only to FIPS compliant APIs. | ||||||||||||||||||||||||||||||
UseIPv6 | DWORD | Controls whether IPv4 or IPv6 is used when listening. Connecting clients will need to connect using the appropriate
IP version. Possible values are:
0 - Off: IPv4 is used (default). 1 - On: IPv6 is used. | ||||||||||||||||||||||||||||||
UseInteractiveLogon | DWORD | Controls the type of logon performed by the application when attempting to authenticate users. Can be
one of the following values:
0 - Off: Regular network logon is performed. More secure, but can't access remote network resources. 1 - On: Interactive logon is performed. Less secure, but allows access to remote network resources. | ||||||||||||||||||||||||||||||
WireEncoding | String | Controls the encoding used by the server on the wire for text sent and received by the server. By default, the server will use ISO-8859-1 (Latin-1) encoding. |
PowerShellASP Specific Registry Keys
Configuration options for the PowerShell ASP server included in PowerShell Server are stored in the Windows registry in HKEY_LOCAL_MACHINE\SOFTWARE\ nsoftware\PowerShellASP. The following values can be configured:
Name | Type | Description |
DefaultDocuments | String | A comma delimited list of default documents for the PowerShell ASP site. If no specific document is specified, the first document from this list that is found in the URL's path will be served to the client. |
EnableCacheRunspace | DWORD | Whether the runspace will be cached for use in future requests. This will allow variables to be stored and accessed again later in a different request. The default value is 0 (False). |
MaxConnections | DWORD | The maximum number of concurrent connections. The default is 25. |
PlainPort | DWORD | The TCP port on which the server will listen for plaintext connections. The default value is 8181. |
SSLCertPassword | String | The password of the SSL server certificate. |
SSLCertStore | String | The store that holds the SSL server certificate. |
SSLCertSubject | String | The subject of the SSL server certificate. |
SSLPort | DWORD | The TCP port on which the server will listen for SSL connections. The default value is 8282. |
TraceLevel | DWORD | Controls the trace level of the logging from the application. Can be
one of the following values:
0 - Off: Nothing is logged. 1 - Error: Only errors are logged. 2 - Warning: Errors and warnings are logged. 3 - Info (default): Errors, warnings and informational messages are logged. 4 - Verbose: All messages, including those useful for debugging and troubleshooting are logged. |
UsePlain | DWORD | Whether or not plaintext connections are accepted. The default value is 1 (True). |
UseSSL | DWORD | Whether or not SSL connections are accepted. The default value is 0 (False). |