Blog

SCOM

How to Delete SCOM 2012 R2 Managed Computers using PowerShell

Usage DeleteSCOMAgents.ps1 -MSServer “zOM01.scom2k12.com” -AgentComputerName “xSP01.scom2k12.com”, “xDV02.scom2k12.com” Download Script: Link Script: Param( [string[]]$AgentComputerName, [string]$MSServer ) [System.Reflection.Assembly]::Load(“Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”) [System.Reflection.Assembly]::Load(“Microsoft.EnterpriseManagement.OperationsManager, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”) function New-Collection ( [type] $type ) {…

Read More