-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathTest
More file actions
51 lines (41 loc) · 1.65 KB
/
Test
File metadata and controls
51 lines (41 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<# This form was created using POSHGUI.com a free online gui designer for PowerShell
.NAME
Untitled
#>
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
$Form = New-Object system.Windows.Forms.Form
$Form.ClientSize = '400,400'
$Form.text = "Form"
$Form.TopMost = $false
$sdasd = New-Object system.Windows.Forms.Button
$sdasd.text = "Restart DMZ Non-Production Servers"
$sdasd.width = 233
$sdasd.height = 30
$sdasd.location = New-Object System.Drawing.Point(10,20)
$sdasd.Font = 'Microsoft Sans Serif,10'
$Form.controls.AddRange(@($sdasd))
$sdasd.Add_Click({
Add-Type -AssemblyName System.Windows.Forms
$popup = New-Object system.Windows.Forms.Form
$Label = New-Object System.Windows.Forms.Label
$Labe2 = New-Object System.Windows.Forms.Label
$pswdbox = New-Object System.Windows.Forms.TextBox
$popup.Controls.Add($Label)
$popup.Controls.Add($pswdbox)
$popup.Controls.Add($label2)
$Label.Text = "Restarting Non-Production Servers, Please Wait"
$Label.AutoSize = $True
$label2.Location = New-Object System.Drawing.Point(60,45)
$label2.Text = 'Enter DMZ Password Here'
$popup.Visible = $True
$popup.Update()
$pswdbox.Location = New-Object System.Drawing.Point(60,60)
$pswdbox.AutoSize = $true
$pswdbox.AcceptsReturn = $True
#Command(s)
$DMZNonProdServers = @('143.158.207.211','143.15.207.75','143.158.207.57','143.158.207.217','143.158.207.215','143.158.207.213')
})
#Hide popup
$popup.Close()
[void]$Form.ShowDialog()