I made a simple "Empty Form" using the template.
From there I used the toolbox and added one button, one textbox (to be used for input), and another textbox (for displaying results from my command).
So the code I got so far is:
Code: Select all
$formLocalUserLookup_Load={
}
$searchbutton_Click={
$global:user = Get-LocalUser $inputuser
}
$usersearchbox_TextChanged={
$global:inputuser = $usersearchbox.Text
}
$textbox1_TextChanged={
#This is where I can't get it to work
$textbox1.Text = $user
}
That seems to work, because I get errors if I type in a user that dosent exist and press my button.
But I can't seem to get the results into my $textbox1.
I would appreciate if anyone could show me how to get this right. And maybe link to some documentation I can read relating to how new I am to this.