Powershell script to add local/domain users to Administrators group on 1 or many computers
To use it, download it, unblock the file, run it in Powershell_ISE for example to load the function, and use it as in:
Add-Admin -ComputerName V-2012r2-vbr1 -NewAdmin Sam77
creates a new user ‘Sam77’ on computer ‘v-2012r2-vbr1’ and makes member of the local Administrators group.
You can add many admins to many computers in the same line:
Add-Admin -ComputerName V-2012r2-vbr1,NoThere,V-2012R2-G2A -NewAdmin Sam8,Sam88,Sam17 -NewAdminPassword New33One!!
The script leaves a log file showing same messages displayed at the console (without the colors of course):