How to add members to the local Administrator group using powershell
The answers is quite simple
PS C:\>[ADSI]"WinNT://./Administrators,group").Add("WinNT://USEFUL-IT/Administrators),group")
But of course this needs to be run locally on the system. So why to do this using powershell if I am already logged on to the system, I can use computer management Right?
Yes you can, but if the system is running core, you need to use powershell to add members to the local Administrator Group.
But I have multiple servers, how can I do this and also have response if it failes..
Here is my initial version of a function you can use from a central server and session into the remote systems, to offload the workload, also to run this in parallel.
Regards,
Wessel.
- [PS] How to validate VMWare ESX Certificates - September 7, 2018
- PoSH-Git : unable to start ssh-agent service, error :1058 - July 22, 2018
- [PS] Speedup VMWare PowerShell module - June 11, 2018