Quantcast
Channel: Operations Manager - General forum
Viewing all articles
Browse latest Browse all 11941

SCOM 2012 Powershell command to remove agent

$
0
0

Hello,

Has anyone had any luck removing agents via Powershell to mimic the delete agent from the console?

Blogs don't turn up anything useful for this task.

The 2012 Powershell covers how to approve agents, add proxy flag, and uninstall agent, but nothing to remove.  Used the SQL stored procedure previously in 2007R2 (and same procedure exists in 2012 SP1. 

Anyone aware of Powershell automate agent removal?

Thanks!

SCOM Power Shell to add SCOM 2012 agent
Get-SCOMPendingManagement | where {$_.AgentName -eq "ServernameFQDN"} | Approve-SCOMPendingManagement
Enable Proxy on newly added agent
Get-ScomAgent | where-object {$_.DisplayName -like "okcnmo*"} | where-object {$_.ProxyingEnabled.Value -eq $False} | Enable-SCOMAgentProxy

SQL Query to remove
http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/thread/e413c030-509b-45e4-bcd4-b4ae1a649c73
Uninstall Agent
http://technet.microsoft.com/library/hh545186.aspx
Remove Unix agents
http://social.technet.microsoft.com/Forums/en-US/operationsmanagerunixandlinux/thread/081f2801-7dfa-4db9-8c78-6adbc487a031/


Viewing all articles
Browse latest Browse all 11941

Trending Articles