Skip to content

Instantly share code, notes, and snippets.

@alainassaf

alainassaf/run-delprof2a.ps1 Secret

Created Feb 7, 2017
Embed
What would you like to do?
Code Snippet 1 from run-delprof2.ps1
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$wgObjForm = New-Object System.Windows.Forms.Form
$wgObjForm.Text = "Select a Worker Group"
$wgObjForm.Size = New-Object System.Drawing.Size(325,700)
$wgObjForm.StartPosition = "CenterScreen"
$OKButton = New-Object System.Windows.Forms.Button
$OKButton.Location = New-Object System.Drawing.Size(75,620)
$OKButton.Size = New-Object System.Drawing.Size(75,23)
$OKButton.Text = "OK"
$OKButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
$wgObjForm.AcceptButton = $OKButton
$wgObjForm.Controls.Add($OKButton)
$CancelButton = New-Object System.Windows.Forms.Button
$CancelButton.Location = New-Object System.Drawing.Size(150,620)
$CancelButton.Size = New-Object System.Drawing.Size(75,23)
$CancelButton.Text = "Cancel"
$CancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$wgObjForm.CancelButton = $CancelButton
$wgObjForm.Controls.Add($CancelButton)
$objLabel = New-Object System.Windows.Forms.Label
$objLabel.Location = New-Object System.Drawing.Point(10,15)
$objLabel.Size = New-Object System.Drawing.Size(280,30)
$objLabel.Text = "The computers in the workergroup will have delprof run against them:"
$wgObjForm.Controls.Add($objLabel)
$objListBox = New-Object System.Windows.Forms.ListBox
$objListBox.Location = New-Object System.Drawing.Point(10,45)
$objListBox.Size = New-Object System.Drawing.Size(275,50)
$objListBox.Height = 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.