Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Invoke-SwisVerb: Access to Orion.Nodes.Unmanage verb denied.

$
0
0

I am working on a script that I can fee a list of servers to and unmanage the servers.

 

I can get all the moving parts to work, but when it comes to the actual invoke-swisverb the script tanks.

 

Here is what I have:

 

$FilePath = Read-Host -Prompt "Input file path to list"

$silenceTime = Read-Host -Prompt "Enter time to silence Servers"

 

 

ForEach ($nodename in (Get-Content -Path $filePath)){

     Write-Host $nodename

     $swis = Connect-Swis -Credential $cred -host $orionservername

     $nodeid = Get-SwisData $swis "SELECT NodeID FROM Orion.Nodes WHERE SysName LIKE '$nodename%'"

     $now =[DateTime]::UtcNow

     $later =$now.AddMinutes($silenceTime)

     Invoke-SwisVerb $swis Orion.Nodes Unmanage @("$nodeid", $now ,$later, "false")

     }


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>