Add User to the Same Groups as Another User with PowerShell

In this article I’ll will explain how to set permissions from an existing Active Directory user to a other existing user in your organization. For example the first existing user is “lex” and the second existing user is “isabel”. The user Isabel will take over the permissions from user “lex”.

First, we take a look at what the permissions are for  user “lex”. To do this, execute the following PowerShell command:

We can also use:

The user Isabel is currently a member of the “Sales” group:

To add Isabel as a member of each of Lex’s  groups, execute the following PowerShell command:

In addition to the “Sales” group, Isabel is now a member of all the groups that Lex is a member of:

Use the -PassThru parameter with the previous command to receive feedback about what groups Isabel is being added as a member of:

If you want add multiple users to the same groups that Lex is a member of, execute the following PowerShell command:

News Source: Mike F Robbins

About Lex van der Horst 192 Articles
Techwire

Be the first to comment

Leave a Reply