TerminalProtocol

Untitled

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