Sounds simple enough. The most simplistic form a code without gui could look something like...
PowerShell Code
Double-click the code block to select all.[string]$User = read-host " Enter username" [string]$Group = read-host " Enter group name" Add-ADGroupMember -Identity $Group -Member $UserIn this particular case there is actually only a subset of groups that I want to allow/show. This command gets me that and puts it into an array.
PowerShell Code
Double-click the code block to select all.$MyGroups=(Get-ADGroup -filter {Name -like "*MY*"}).NameNow for the fun and problem. Text box input in GUI, easy! Got it. A dropdown populate by an array? Umm... Is that a combobox? A listbox? Ok lets try combobox... ok.. why cant I get $Items=$MyGroups to work right? Am I putting my code in the proper area? Man this seems harder than when I learned C#... I must be missing something, or over thinking. The next problem I am sure I will have after this is result handling. I want to tell the user what the result was in the GUI, but I'll stumble upon that when I stumble upon that.
If it is helpful I can post the full script I am trying to GUI'ify, but that seems like overkill, with all of its error handling it is 102 lines.