Hello,
I can't seem to figure this out, I am using the following Powershell script to update the status of a single node, but it errors on the Set-SwisObject portion.
Import-Module SwisPowerShell
# Connect to SWIS
$hostname = "localhost"
$username = "xxxxx"
$password = "xxxxx"
$swis = Connect-Swis -host $hostname -UserName $username -Password $password -IgnoreSslErrors
$nodeId=11362
$param = @{
Status="1"
Set-SwisObject $swis -Uri 'swis://localhost/Orion/Orion.Nodes/NodeID=11362' -Properties @{ Status = "1"}
The Error I get is:
PS D:\> .\StatusUpdate.ps1
At D:\StatusUpdate.ps1:21 char:4
+ Set-SwisObject $swis -Uri 'swis://localhost/Orion/Orion.Nodes/NodeID= ...
+ ~
Missing '=' operator after key in hash literal.
At D:\StatusUpdate.ps1:21 char:4
+ Set-SwisObject $swis -Uri 'swis://localhost/Orion/Orion.Nodes/NodeID= ...
+ ~
The hash literal was incomplete.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingEqualsInHashLiteral
PS D:\> .\StatusUpdate.ps1
At D:\StatusUpdate.ps1:21 char:4
+ Set-SwisObject $swis -Uri 'swis://localhost/Orion/Orion.Nodes/NodeID= ...
+ ~
Missing '=' operator after key in hash literal.
At D:\StatusUpdate.ps1:21 char:4
+ Set-SwisObject $swis -Uri 'swis://localhost/Orion/Orion.Nodes/NodeID= ...
+ ~
The hash literal was incomplete.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingEqualsInHashLiteral
Please, any help would be awesome, I can't see why it would be failing where it is.
Thank you,
Tom