Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Deleting an Orion Agent and its Node using Powershell SDK instead of GUI

$
0
0

I want to replicate the behavior in the GUI that occurs if I go to:

 

https://myOrionServer/Orion/AgentManagement/Admin/ManageAgents.aspx

 

Select an Agent, and click Delete. This not only removes the Agent registration, it also deletes the Node and cleans up everything associated with it.

 

I THINK the correct way to do that with Powershell is:

 

invoke-swisverb $swis Orion.AgentManagement.Agent delete @($agentid)

 

Where $swis is the SwisConnection, Orion.AgentManagement.Agent is the Entity, delete is the Verb, and $agentid is the integer in the AgentId column in the Orion.AgentManagement.Agent table.

 

Am I correct in my syntax? Will this accomplish the same thing that using the GUI does when I select an Agent and click Delete? If not, what else would I need to do?


Viewing all articles
Browse latest Browse all 3719

Trending Articles



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