PS C:\> 'server1','server2','Badserver' | Set-UserPassword -Username 'test' -Password 'pass123' -Verbose VERBOSE: Processing server 'server1'... VERBOSE: Connected to server 'server1'... VERBOSE: Retrieved user objects from server 'server1'... VERBOSE: Found user 'test' from server 'server1'... 10/12/2015 14:41:31 - Successfully changed password for user 'test' on server 'server1' VERBOSE: Processing server 'server2'... VERBOSE: Connected to server 'server2'... VERBOSE: Retrieved user objects from server 'server2'... WARNING: ERROR: No user 'test' on server 'server2' VERBOSE: Processing server 'Badserver'... WARNING: ERROR: Failed to connect to server 'Badserver' PS C:\>
About Me
My Links
Monday, October 12, 2015
Powershell Script - Set-UserPassword - Remotely sets local account passwords
Here's a great script to change passwords in bulk on many servers. I've added verbose and error output for logging purposes as well as time/date stamping for when actual password setting occurs.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment