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?