Author Posts

July 21, 2014 at 5:24 am

Hi,

I have a list of AD Computer Objects that i need to remove. Does anyone have a script to hand that will read through the list (txt) and remove them ?

July 21, 2014 at 5:41 am

To keep it simple, it's a one-liner:

Get-Content C:\MyComputers.txt | foreach{Get-ADComputer -Identity $_ | Remove-ADComputer -WhatIf}

After you validate the command is identify the correct object to remove, you can remove the -WhatIf to actually perform a move.

July 21, 2014 at 5:47 am

Fantastic – Cheers Rob!