Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import the CSV File with all the stuff.
- Import-CSV C:\Temp\Test.csv
- # Initiate a ForEach loop.
- ForEach ($Computer in $ComputerName){
- # Invoke the command to actually set the registry key.
- Invoke-Command -ComputerName $Computer -ScriptBlock {reg add "hklm\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d $Password /f}
- }
Advertisement
Add Comment
Please, Sign In to add comment