System Center Orchestrator runbook for removing SCCM records

Hi Everyone ,

Hope you are doing great! Today i am writing about an scenario  which talks about automating SCCM record removal through Orchestrator .

The runbook once  created will look like the following :


You can use the following Powershell script to remove the record from the database :


cd “D:\Program Files\Microsoft Configuration Manager\AdminConsole\bin”;
import-module .\configurationmanager.psd1;
set-location \`d.T.~Ed/{7FD7AB41-87F7-4E8C-9218-BEE9ACC188E9}.{DEB5CFDE-44C0-474E-87D6-0AD6A68EF1A9}\`d.T.~Ed/:
remove-cmdevice -devicename “\`d.T.~Ed/{7FD7AB41-87F7-4E8C-9218-BEE9ACC188E9}.{4219AE46-A6F0-4C74-8F07-B159A362E39B}\`d.T.~Ed/” -force -ErrorAction SilentlyContinue

if ($error.count -gt 0) {
} else {

You can change the path of the configuration manager console accordingly .

Please let me know if you face any issues implementing the same .



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Powered by

Up ↑

%d bloggers like this: