JCJohnson76
asked on
Bulk computer reset
Hello,
I will like to bulk reset computer accounts in AD. The goal is to try and break domain trust relationship with a bunch of computers. I would like to user Powershell and import-csv to carry out this task. Can someone provide me the syntax for this.
I will like to bulk reset computer accounts in AD. The goal is to try and break domain trust relationship with a bunch of computers. I would like to user Powershell and import-csv to carry out this task. Can someone provide me the syntax for this.
Or Powershell. Computers.txt contains a list of computers without a header
Get-Content "C:\temp\computers.txt";foreach($computer in $computers){Reset-ComputerMachinePassword -server $computer}
ASKER
dsmod is fine also but how do u use bulk import with dsmod;
Also will disable-adcomputer do the same;
Also will disable-adcomputer do the same;
ASKER
did not work
I revamp the script to
$Computers = Get-Content "C:\scripts\Reset-Computer s\Input\Co mputers.tx t"
foreach($computer in $computers){Reset-Computer MachinePas sword -server $computer}
Received the error message
Cannot reset the secure channel password for the computer account in the domain. Operation failed with the following exception: The server is not operational
I revamp the script to
$Computers = Get-Content "C:\scripts\Reset-Computer
foreach($computer in $computers){Reset-Computer
Received the error message
Cannot reset the secure channel password for the computer account in the domain. Operation failed with the following exception: The server is not operational
ASKER
how can I use the dsmod command using the foreach loop alongside the invoke-command
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window