What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

More then 1 parameter for powershell when adding a sensor

Votes:

0

"Hostnamehere","%windowsuser","%windowspassword" -> when adding the sensor

i pass these in my script:

###
param(
    [string]$ComputerName,
    [string]$username,
    [string]$password
    )


$SecPasswd = ConvertTo-SecureString $password -AsPlainText -Force

$Credentials = New-Object System.Management.Automation.PSCredential ($username, $SecPasswd)


$ret = Invoke-Command -UseSSL -ComputerName $ComputerName -Credential $Credentials -ScriptBlock {

when i manually run it with

Scriptname -Computername "Hostname" -username user -password password

it works... Any ideas ?

powershell prtg scripting

Created on May 6, 2020 1:55:29 PM

Last change on May 6, 2020 3:18:24 PM by  Birk Guttmann [Paessler Support]



3 Replies

Votes:

0

Hi there,

Please remove the , in the parameter section when adding the sensor.

Does it work afterwards?


Kind regards,
Birk Guttmann, Tech Support Team

Created on May 7, 2020 10:33:09 AM by  Birk Guttmann [Paessler Support]

Last change on May 7, 2020 10:33:28 AM by  Birk Guttmann [Paessler Support]



Votes:

0

like so ?

%host%windowsuser%windowspassword ?

Created on May 7, 2020 10:35:19 AM



Votes:

0

Hi,

Please try it this way:

"%host" "%windowsuser" "%windowspassword"

Kind regards,
Birk Guttmann, Tech Support Team

Created on May 7, 2020 6:49:53 PM by  Birk Guttmann [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.