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 ?
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 ?
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.
Fantastic - Cheers Rob!