Code Snippet 1 from run-delprof2.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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