Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Can you supply multiple identities to the Add-ADGroupMember object?

$
0
0

Hi,

I want to add a new AD User to a number of groups, and I would like to know the best way of doing it.

I have created four groups.

  • Support
  • Finance
  • Warehouse
  • Projects

I can add the user to a single group using the following code.

Add-ADGroupMember-Identity Support-Members$Obj

But, I would like to add them to more than one. With something like below?

Add-ADGroupMember-Identity Support, Finance, Warehouse, Projects -Members$Obj

That line doesn't work, so is there another way of doing this?

Thanks


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>