Jason Amick
Jason Amick

Reputation: 35

PowerShell Form building

I have built a pretty basic form for running New-ADUser and Add-AdGroupMember.

Right now I have it saved as a Function in psm1.

You bring up PS type the function name and the form loads on top of the powershell window. So far so good. But the users I have using it are wanting me to make the cursor active in the Textbox1 field automagically.

Anyone with an idea on somewhere I can find that info?

Upvotes: 0

Views: 61

Answers (1)

Shamus Berube
Shamus Berube

Reputation: 486

Set the focus on the textbox object:

$textbox.Focus()

Upvotes: 1

Related Questions