Selecting multiple users then adding them to group

Ask your 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.
This topic is 5 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Chris_Ediger
Posts: 45
Last visit: Tue May 09, 2023 8:35 pm

Selecting multiple users then adding them to group

Post by Chris_Ediger »

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 »

[TOPIC MOVED BY MODERATOR]
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Selecting multiple users then adding them to group

Post by jvierra »

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
Last visit: Sat Mar 31, 2018 4:23 am

Re: Selecting multiple users then adding them to group

Post by Bitmans »

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.
This topic is 5 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked