[PS] Function to add localadmins

How to add members to the local Administrator group using powershell

The answers is quite simple

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.






I am a Technical Specialist - Cloud Infrastructures from the Netherlands.
My Skills are mainly PowerShell, VMWare, Hyper-V, Microsoft System Center products and Windows Azure Pack.

I work for a company in Utrecht The Netherlands.