Like most of you i try and make peoples lives easier and remove repetitive tasks. If you are like me and use "All Unknown Computers" to deploy your OSD to you will also be fairly familiar of making sure you have cleared an object from the SCCM Database before trying to reimage, otherwise ... well its not Unknown now is it?
Typically this would involve a tech opening AD searching for the computer and removing it, then opening the SCCM console and doing the same.
I thought i would write a simple little tool to take the repetitiveness away.. here it is in action:
The tool will list all objects in your specified OU with name and description. You can then either delete from SCCM, AD or Both.
Here is the full Code.
I suggest saving this as a .ps1 file and then compiling to an EXE with PowerGUI or similar.
You will need to edit lines:
263 (SCCM Server Address).
264 (SCCM Site Code XXX)
265 (AD SearchBase)