Selecting multiple users then adding them to group

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
Chris.Ediger
Posts: 24
Joined: Tue Oct 24, 2017 9:33 am

Selecting multiple users then adding them to group

Post by Chris.Ediger » Wed Mar 21, 2018 8:07 am

Product, version and build: PowerShell Studio 2018 v5.5.150
32 or 64 bit version of product: 64-Bit
Operating system: Windows 10 v1709
32 or 64 bit OS: 64-bit

(Here is the obligatory "I'm new to this" message :D)

Looking for some direction on this project. I want to select multiple users and add them to a list that will be added to a security group. Not asking for step-by-step, just what to start with.

cody m

Re: Selecting multiple users then adding them to group

Post by cody m » Wed Mar 21, 2018 8:10 am

[TOPIC MOVED BY MODERATOR]

User avatar
jvierra
Posts: 13790
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Selecting multiple users then adding them to group

Post by jvierra » Wed Mar 21, 2018 3:25 pm

List all users in a listbox set to multi-select and have user select the users to add. Provide a button that adds selected users to the group. If you use SamAccountName the array of users can be added as an array/collection I one call.

User avatar
Bitmans
Posts: 1
Joined: Fri Mar 30, 2018 4:32 am
Location: https://bitmann.org/best-cryptocurrency ... -platform/

Re: Selecting multiple users then adding them to group

Post by Bitmans » Fri Mar 30, 2018 5:14 am

Hey,
highlight all the users you want in the group, right click, all tasks, "add to group".
Select the group you want them added to and it adds them all at once. much better than selecting one at a time with a semicolon between members.

Locked