# Help for a gui script

**URL:** <https://forums.powershell.org/t/help-for-a-gui-script/12569>\
**Category:** PowerShell Help\
**Created:** [May 16, 2019, 9:14pm UTC](https://forums.powershell.org/t/help-for-a-gui-script/12569 "2019-05-16T21:14:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![princepsycho](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@princepsycho](https://forums.powershell.org/u/princepsycho)\
**Post date:** [May 16, 2019, 9:14pm UTC](https://forums.powershell.org/t/help-for-a-gui-script/12569/1 "2019-05-16T21:14:33Z")

</div>

Hi,

I need help,

I want to make a script to display all the groups of a windows user in a gui using the cmd let “Get-ADGroupMember” then I can select several of them to do a click button event that copy the selected groups into another users that needs the groups.

what should I use to do that ? combobox ? listview ?..

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [May 16, 2019, 9:18pm UTC](https://forums.powershell.org/t/help-for-a-gui-script/12569/2 "2019-05-16T21:18:23Z")

</div>

> [@](#):
>
> then I can select several of them

Then I suggest a multiselect listbox.

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [May 18, 2019, 4:37pm UTC](https://forums.powershell.org/t/help-for-a-gui-script/12569/3 "2019-05-18T16:37:41Z")

</div>

You can use `Out-GridView` as a gui to display and select multiple users.

```
Get-ADGroupMember -Identity group1 |Out-GridView -Passthru -OutputMode Multiple
```

---

<div class="post-metadata">

**Author:** ![postanote](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@postanote](https://forums.powershell.org/u/postanote)\
**Post date:** [May 19, 2019, 8:27pm UTC](https://forums.powershell.org/t/help-for-a-gui-script/12569/4 "2019-05-19T20:27:20Z")

</div>

There are ways to do what you are after without write any GUI/Form code. See these.

Creating a Simplistic GUI Interface with Out-GridView  
[https://mikefrobbins.com/2014/09/11/creating-a-simplistic-gui-interface-with-out-gridview](https://mikefrobbins.com/2014/09/11/creating-a-simplistic-gui-interface-with-out-gridview)

Creating a GUI Using Out-GridView in PowerShell

> **[Creating a GUI Using Out-GridView in PowerShell -- Microsoft Certified...](https://mcpmag.com/articles/2016/02/17/creating-a-gui-using-out-gridview.aspx)**
>
> A beginner's guide to get Graphical User Interfaces up and running.

Fun with PowerShell’s Out-GridView

> **[Fun with PowerShell's Out-GridView -- Microsoft Certified Professional...](https://mcpmag.com/articles/2013/01/08/pshell-gridview.aspx)**
>
> PowerShell 3 stretches out the features of older cmdlets. Out-Gridview is one example, which I show off in this week's tip.

Poor Man’s GUI

> **[Poor Man's GUI](https://ngetchell.com/poor-mans-gui/)**
>
> If you’re like me, you try to automate everything through the PowerShell
> console. Automate employee account creation, easy. Check the registry on 500
> remote servers, wouldn’t break a sweat. How about delegating your script to a
> junior systems...

Show-Command - PowerShell for GUI admins?  
[https://4sysops.com/archives/show-command-powershell-for-gui-admins](https://4sysops.com/archives/show-command-powershell-for-gui-admins)

Tag Archives: Out-Gridview (A PowerShell Core Out-Gridview Solution)

[https://jdhitsolutions.com/blog/tag/out-gridview](https://jdhitsolutions.com/blog/tag/out-gridview)  
[https://jdhitsolutions.com/blog/tag/out-gridview/page/2](https://jdhitsolutions.com/blog/tag/out-gridview/page/2)

So, stuff like…

```
(Get-ADGroupMember -Identity $((Get-ADGroup -Filter '*').Name | 
Sort-Object | 
Out-GridView -Title 'Select a group' -PassThru)).Name | 
Out-GridView -Title 'Select member name(s)' -OutputMode Multiple
```

The write whatever code you want to process that return.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:32pm UTC](https://forums.powershell.org/t/help-for-a-gui-script/12569/5 "2024-05-16T20:32:48Z")

</div>


