What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. 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

Your Vote:

Up

Down

"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 by  BartTechne (0) 2

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



3 Replies

Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

like so ?

%host%windowsuser%windowspassword ?

Created on May 7, 2020 10:35:19 AM by  BartTechne (0) 2



Votes:

0

Your Vote:

Up

Down

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]



Please log in or register to enter your reply.


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.