Function MyMenu {``` my code below for the UI, I've since found a couple of utilities that would have created this for me
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$x=""
$y=""
$usrin=""
$objForm = New-Object System.Windows.Forms.Form
$objForm.Text = "Log Quick Job"
$objForm.Size = New-Object System.Drawing.Size(310,300)
$objForm.StartPosition = "CenterScreen"
$objForm.KeyPreview = $True
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
{$x=$objTextBox.Text;$objForm.Close()}})
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape") {$objForm.Close()}})
Change Pword
$PwordButton = New-Object System.Windows.Forms.Button$PwordButton.Location = New-Object System.Drawing.Size(1,120)
$PwordButton.Size = New-Object System.Drawing.Size(75,23)
$PwordButton.Text = "Password"
$PwordButton.Add_Click({$x=$objTextBox.Text; $y="Changed User Password"; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($PwordButton)
Chioce1
$c1Button = New-Object System.Windows.Forms.Button$c1Button.Location = New-Object System.Drawing.Size(1,144)
$c1Button.Size = New-Object System.Drawing.Size(75,23)
$c1Button.Text = "AcLockd"
$c1Button.Add_Click({$x=$objTextBox.Text; $y="choice1"; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($c1Button)
Chioce2
$C2Button = New-Object System.Windows.Forms.Button$C2Button.Location = New-Object System.Drawing.Size(1,168)
$C2Button.Size = New-Object System.Drawing.Size(75,23)
$C2Button.Text = "Asoc Amnd"
$C2Button.Add_Click({$y="choice2"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($C2Button)
Chioce3
$C3Button = New-Object System.Windows.Forms.Button$C3Button.Location = New-Object System.Drawing.Size(1,192)
$C3Button.Size = New-Object System.Drawing.Size(75,23)
$C3Button.Text = "Query"
$C3Button.Add_Click({$y="choice3"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($C3Button)
choice2.1
$CH21Button = New-Object System.Windows.Forms.Button$CH21Button.Location = New-Object System.Drawing.Size(100,120)
$CH21Button.Size = New-Object System.Drawing.Size(75,23)
$CH21Button.Text = "MyPr Paper"
$CH21Button.Add_Click({$y="choice21"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH21Button)
choice2.2
$CH22Button = New-Object System.Windows.Forms.Button$CH22Button.Location = New-Object System.Drawing.Size(100,144)
$CH22Button.Size = New-Object System.Drawing.Size(75,23)
$CH22Button.Text = "MyPr Toner"
$CH22Button.Add_Click({$y="choice22"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH22Button)
choice2.3
$CH23Button = New-Object System.Windows.Forms.Button$CH23Button.Location = New-Object System.Drawing.Size(100,168)
$CH23Button.Size = New-Object System.Drawing.Size(75,23)
$CH23Button.Text = "S Phone"
$CH23Button.Add_Click({$y="choice23"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH23Button)
choice2.4
$CH24Button = New-Object System.Windows.Forms.Button$CH24Button.Location = New-Object System.Drawing.Size(100,192)
$CH24Button.Size = New-Object System.Drawing.Size(75,23)
$CH24Button.Text = "Eduroam"
$CH24Button.Add_Click({$y="choice24"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH24Button)
choice3.1
$CH31Button = New-Object System.Windows.Forms.Button$CH31Button.Location = New-Object System.Drawing.Size(200,120)
$CH31Button.Size = New-Object System.Drawing.Size(75,23)
$CH31Button.Text = "Non IT Query"
$CH31Button.Add_Click({$y="choice31"; $x=$objTextBox.Text; $usrin=$objTextBox2.Text; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH31Button)
choice3.2
$CH32Button = New-Object System.Windows.Forms.Button$CH32Button.Location = New-Object System.Drawing.Size(200,144)
$CH32Button.Size = New-Object System.Drawing.Size(75,23)
$CH32Button.Text = "choice"
$CH32Button.Add_Click({$y="choice32"; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH32Button)
choice3.3
$CH33Button = New-Object System.Windows.Forms.Button$CH33Button.Location = New-Object System.Drawing.Size(200,168)
$CH33Button.Size = New-Object System.Drawing.Size(75,23)
$CH33Button.Text = "choice"
$CH33Button.Add_Click({$y="choice33"; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH33Button)
choice3.4
$CH34Button = New-Object System.Windows.Forms.Button$CH34Button.Location = New-Object System.Drawing.Size(200,192)
$CH34Button.Size = New-Object System.Drawing.Size(75,23)
$CH34Button.Text = "choice"
$CH34Button.Add_Click({$y="choice34"; $source=$objTextBox3.Text; $objForm.Close()})
$objForm.Controls.Add($CH34Button)
Cancel
$CancelButton = New-Object System.Windows.Forms.Button$CancelButton.Location = New-Object System.Drawing.Size(100,235)
$CancelButton.Size = New-Object System.Drawing.Size(75,23)
$CancelButton.Text = "Close"
$CancelButton.Add_Click({$exit = 1; $source = ""; $objForm.Close()})
$objForm.Controls.Add($CancelButton)
UserName box
$objLabel = New-Object System.Windows.Forms.Label$objLabel.Location = New-Object System.Drawing.Size(10,20)
$objLabel.Size = New-Object System.Drawing.Size(150,20)
$objLabel.Text = "User Name"
$objForm.Controls.Add($objLabel)
$objTextBox = New-Object System.Windows.Forms.TextBox
$objTextBox.Location = New-Object System.Drawing.Size(10,40)
$objTextBox.Size = New-Object System.Drawing.Size(150,20)
$objForm.Controls.Add($objTextBox)
Source box
$objLabel = New-Object System.Windows.Forms.Label$objLabel.Location = New-Object System.Drawing.Size(170,20)
$objLabel.Size = New-Object System.Drawing.Size(280,20)
$objLabel.Text = "Source (E,P or W)"
$objForm.Controls.Add($objLabel)
$objTextBox3 = New-Object System.Windows.Forms.TextBox
$objTextBox3.Location = New-Object System.Drawing.Size(170,40)
$objTextBox3.Size = New-Object System.Drawing.Size(90,20)
$objForm.Controls.Add($objTextBox3)
Problem text box
$objLabel = New-Object System.Windows.Forms.Label$objLabel.Location = New-Object System.Drawing.Size(10,60)
$objLabel.Size = New-Object System.Drawing.Size(280,20)
$objLabel.Text = "Description"
$objForm.Controls.Add($objLabel)
$objTextBox2 = New-Object System.Windows.Forms.TextBox
$objTextBox2.Location = New-Object System.Drawing.Size(10,80)
$objTextBox2.Size = New-Object System.Drawing.Size(260,20)
$objForm.Controls.Add($objTextBox2)
$objForm.Topmost = $True
$objForm.Add_Shown({$objForm.Activate()})
[void] $objForm.ShowDialog()