I am trying o make this command in to a GUI.
I have my GUI set up but I am not sure how to put in the command. I am bew to powershell so forgive me for ignornace.
# Load the Winforms assembly [reflection.assembly]::LoadWithPartialName( "System.Windows.Forms")Create the form
$form = New-Object Windows.Forms.Form
#Set the dialog title
$form.text = “Find User”Create the label control and set text, size and location
$label = New-Object Windows.Forms.Label
$label.Location = New-Object Drawing.Point 50,30
$label.Size = New-Object Drawing.Point 200,15
$label.text = “Enter IP Address”Create TextBox and set text, size and location
$textfield = New-Object Windows.Forms.TextBox
$textfield.Location = New-Object Drawing.Point 50,60
$textfield.Size = New-Object Drawing.Point 200,30Create Button and set text and location
$button = New-Object Windows.Forms.Button
$button.text = “Find User”
$button.Location = New-Object Drawing.Point 100,90{Get-WmiObject -Class win32_computersystem -ComputerName 10.XXX.XX.XX | select username