Add a User to the Local Administrators Group

In this article I’ll show you how to add a domain user to the Local Administrators group. You can do this on a single computer or multiple computers in a domain.

The PowerShell one-liner can be scaled up to 20 or 30 computers without any problem. To do this I using the Invoke-Command PowerShell cmdlet which allows me to run PowerShell cmdlets to a local computer or remote computers in a domain.

First I create a fictional domain user David Eruza, with the following PowerShell command:

In the example below, I’ll add the fictional domain user David Eruza (deruza@cloud.local) to the local Administrators group on two servers (server1, server2):

If you want learn more about Invoke-Command, just run the following PowerShell command:

In this article I’ll show you how to create a new AD user and how to add a domain user to the Local Administrators group on other servers.

I really like to hear what you have to say about this article:

  • Was this article helpful for you or do you have any questions?
  • Do you have additions, suggestions or any other ideas?
  • Just let me know by leaving a comment below.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon!

About Lex van der Horst 201 Articles
Techwire

Be the first to comment

Leave a Reply