switch statement is unnecessary. Why? We already have validated input.
Aren't you glad that you read the help? You probably learned many more things but most important is that help can answer most of your questions.
Combobox example
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.
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.
- dan.potter
- Posts: 709
- Last visit: Wed Nov 14, 2018 11:39 am
Re: Combobox example
No - Text is not a property. The OP states the box is loaded with string names of domains.dan.potter wrote:get-aduser... -server $combobox1.SelectedItem
might have to use text, I didn't try it.
If we were to load the cb with Domain Objects then this would work:
Get-Aduser -Filter * -Server $combobox1.SelectedItem.DNSName
See how that works?
- dan.potter
- Posts: 709
- Last visit: Wed Nov 14, 2018 11:39 am