This article applies as of PRTG 22
Tips for running sensors using PowerShell scripts
The following tips to resolve PowerShell error messages apply to preconfigured and custom sensors.
"Unknown security error"
If you add a PowerShell sensor to PRTG, you sometimes may get the error message below, even if your systems are in the domain and the credentials are valid:
Connecting to remote server failed with the following error message:
WinRM cannot process the request.
The following error occurred while using Kerberos authentication:
Unknown security error.
Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method
and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name
and port does not exist.
-The client and remote computers are in different domains
and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method;
add the destination computer to the WinRM TrustedHosts
configuration setting or use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.
-For more information about WinRM configuration,
run the following command: winrm help config.
For more information, see the about_Remote_Troubleshooting Help topic.
Use the FQDN (Fully Qualified Domain Name) instead of the IP address. You can specify the FQDN in the IPv4 Address/DNS Name field in the settings of the sensor’s parent device.
"No logon servers available"
If WinRM cannot process the request and you get a No logon servers available error, see I get the error "WinRM cannot process the request" when I try to use a PowerShell sensor.
"Unauthorized access"
Windows 64-bit systems run two PowerShell versions: PowerShell 64-bit and PowerShell 32-bit. Make sure that you set the correct execution policy for both and that it is unrestricted:
Set-ExecutionPolicy Unrestricted
For more information, see PowerShell 32-bit or 64-bit and Execution Policy.
Note: The user context may be different when the script is executed by the probe system (this is the "LOCAL SYSTEM" account by default) and not by your Windows account when you manually run the script.
Add comment