PowerShell: Delete Mutiple SCCM Devices from SCCM

Home/All Posts, PowerShell, SCCM/PowerShell: Delete Mutiple SCCM Devices from SCCM

PowerShell: Delete Mutiple SCCM Devices from SCCM

PowerShell is, without doubt, the future of administration in SCCM. Because it’s faster and easier to do complicated things or add multiple items into SCCM with PowerShell instead of using the GUI.
I’m trying to use PowerShell as much as possible, but it’s hard to remember all command’s, then you don’t use them every day, so I will use this as a reference book. In the future, I will post many PowerShell that I have created or find useful for future purposes. I hope you can find some of the script or information on this site useful in your daily work. !

Let’s get started!

Delete Multiple SCCM Devices from SCCM

So as you can see below this is a very simple one-line script. That you can use to delete multiple SCCM Devices from SCCM from a list of computers in a text file.
The only thing you have to change in the script is the orange text. Replace this text with the path for your text file.

You need to format your text file as shown on the picture above.

INFO: Before running the script, you have to import System Center Configuration Manager Cmdlet.
 Visit How to load Configuration manager
Get-Content "C:\TEMP\ComputersToDelete.txt" | foreach { Remove-CMDevice -DeviceName $_ }
By | 2018-06-12T08:50:54+01:00 October 3rd, 2017|Categories: All Posts, PowerShell, SCCM|Tags: , , , , |0 Comments

About the Author:

Leave A Comment