2241 lines
90 KiB
PowerShell
2241 lines
90 KiB
PowerShell
function Get-ScriptDirectory {
|
|
#Return the directory name of this script
|
|
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
|
|
Split-Path $Invocation.MyCommand.Path
|
|
}
|
|
|
|
Add-Type -Name Window -Namespace Console -MemberDefinition '
|
|
[DllImport("Kernel32.dll")]
|
|
public static extern IntPtr GetConsoleWindow();
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);
|
|
'
|
|
$ScriptPath = Get-ScriptDirectory
|
|
$ErrorActionPreference = "SilentlyContinue"
|
|
|
|
|
|
if ([System.Threading.Thread]::CurrentThread.GetApartmentState() -ne [System.Threading.ApartmentState]::STA )
|
|
{ Throw (new-object System.Threading.ThreadStateException("The current script requires that the Powershell session must be run in the threading model STA (Single Thread Apartment).")) }
|
|
|
|
# Loading external assemblies
|
|
Add-Type -AssemblyName System.Windows.Forms
|
|
Add-Type -AssemblyName System.Drawing
|
|
# Creation of the components.
|
|
$Form1 = New-Object System.Windows.Forms.Form
|
|
|
|
$tabControl1 = New-Object System.Windows.Forms.TabControl
|
|
$tabPage1 = New-Object System.Windows.Forms.TabPage
|
|
$Clear = New-Object System.Windows.Forms.Button
|
|
$groupBox3 = New-Object System.Windows.Forms.GroupBox
|
|
$GMBox = New-Object System.Windows.Forms.ListBox
|
|
$EmailBox = New-Object System.Windows.Forms.GroupBox
|
|
$label15 = New-Object System.Windows.Forms.Label
|
|
$label14 = New-Object System.Windows.Forms.Label
|
|
$label13 = New-Object System.Windows.Forms.Label
|
|
$label12 = New-Object System.Windows.Forms.Label
|
|
$label11 = New-Object System.Windows.Forms.Label
|
|
$label10 = New-Object System.Windows.Forms.Label
|
|
$label9 = New-Object System.Windows.Forms.Label
|
|
$label8 = New-Object System.Windows.Forms.Label
|
|
$label7 = New-Object System.Windows.Forms.Label
|
|
$label6 = New-Object System.Windows.Forms.Label
|
|
$label5 = New-Object System.Windows.Forms.Label
|
|
$label4 = New-Object System.Windows.Forms.Label
|
|
$label3 = New-Object System.Windows.Forms.Label
|
|
$label2 = New-Object System.Windows.Forms.Label
|
|
$label1 = New-Object System.Windows.Forms.Label
|
|
$VPNBox = New-Object System.Windows.Forms.TextBox
|
|
$PEBox = New-Object System.Windows.Forms.TextBox
|
|
$PLSBox = New-Object System.Windows.Forms.TextBox
|
|
$OCBox = New-Object System.Windows.Forms.TextBox
|
|
$MEBox = New-Object System.Windows.Forms.TextBox
|
|
$OUBox = New-Object System.Windows.Forms.TextBox
|
|
$LLTBox = New-Object System.Windows.Forms.TextBox
|
|
$LBPBox = New-Object System.Windows.Forms.TextBox
|
|
$JTBox = New-Object System.Windows.Forms.TextBox
|
|
$EIDBox = New-Object System.Windows.Forms.TextBox
|
|
$textBox6 = New-Object System.Windows.Forms.TextBox
|
|
$DNBox = New-Object System.Windows.Forms.TextBox
|
|
$MyIDBox = New-Object System.Windows.Forms.TextBox
|
|
$AEBox = New-Object System.Windows.Forms.TextBox
|
|
$ACDBox = New-Object System.Windows.Forms.TextBox
|
|
$groupBox1 = New-Object System.Windows.Forms.GroupBox
|
|
$Search = New-Object System.Windows.Forms.Button
|
|
$UNBox = New-Object System.Windows.Forms.TextBox
|
|
$radioButton3 = New-Object System.Windows.Forms.RadioButton
|
|
$radioButton1 = New-Object System.Windows.Forms.RadioButton
|
|
$tabPage2 = New-Object System.Windows.Forms.TabPage
|
|
$groupBox6 = New-Object System.Windows.Forms.GroupBox
|
|
$label21 = New-Object System.Windows.Forms.Label
|
|
$numericUpDown1 = New-Object System.Windows.Forms.NumericUpDown
|
|
$label20 = New-Object System.Windows.Forms.Label
|
|
$groupBox2 = New-Object System.Windows.Forms.GroupBox
|
|
$AutoClearCheck = New-Object System.Windows.Forms.CheckBox
|
|
$label19 = New-Object System.Windows.Forms.Label
|
|
$richTextBox1 = New-Object System.Windows.Forms.RichTextBox
|
|
$REBOOTButton = New-Object System.Windows.Forms.Button
|
|
$REMOTEButton = New-Object System.Windows.Forms.Button
|
|
$LAPSButton = New-Object System.Windows.Forms.Button
|
|
$CLUButton = New-Object System.Windows.Forms.Button
|
|
$CFEButton = New-Object System.Windows.Forms.Button
|
|
$textBox1 = New-Object System.Windows.Forms.TextBox
|
|
$label18 = New-Object System.Windows.Forms.Label
|
|
$tabPage3 = New-Object System.Windows.Forms.TabPage
|
|
$webBrowser1 = New-Object System.Windows.Forms.WebBrowser
|
|
$toolStrip1 = New-Object System.Windows.Forms.ToolStrip
|
|
$toolStripDropDownButton1 = New-Object System.Windows.Forms.ToolStripDropDownButton
|
|
$closeToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$toolStripDropDownButton2 = New-Object System.Windows.Forms.ToolStripDropDownButton
|
|
$themeToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$lightToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$toolStripMenuItem2 = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$strawberryToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$solarizedToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$draculaToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$halloweenToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$vaporwaveToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$seapunkToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$seawaveToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$sunsetToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$toolStripDropDownButton3 = New-Object System.Windows.Forms.ToolStripDropDownButton
|
|
$hscToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$irtToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$geolocationToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
$button3 = New-Object System.Windows.Forms.Button
|
|
$button4 = New-Object System.Windows.Forms.Button
|
|
$button6 = New-Object System.Windows.Forms.Button
|
|
$button7 = New-Object System.Windows.Forms.Button
|
|
$button8 = New-Object System.Windows.Forms.Button
|
|
$button9 = New-Object System.Windows.Forms.Button
|
|
$button10 = New-Object System.Windows.Forms.Button
|
|
$button11 = New-Object System.Windows.Forms.Button
|
|
$button12 = New-Object System.Windows.Forms.Button
|
|
$button14 = New-Object System.Windows.Forms.Button
|
|
$button15 = New-Object System.Windows.Forms.Button
|
|
$button16 = New-Object System.Windows.Forms.Button
|
|
$button17 = New-Object System.Windows.Forms.Button
|
|
$button18 = New-Object System.Windows.Forms.Button
|
|
$button19 = New-Object System.Windows.Forms.Button
|
|
$Incident = New-Object System.Windows.Forms.Button
|
|
$groupBox4 = New-Object System.Windows.Forms.GroupBox
|
|
$IncidentBox = New-Object System.Windows.Forms.TextBox
|
|
$label17 = New-Object System.Windows.Forms.Label
|
|
$CallerNameBox = New-Object System.Windows.Forms.TextBox
|
|
$label16 = New-Object System.Windows.Forms.Label
|
|
$groupBox5 = New-Object System.Windows.Forms.GroupBox
|
|
$label23 = New-Object System.Windows.Forms.Label
|
|
$label22 = New-Object System.Windows.Forms.Label
|
|
$textBox3 = New-Object System.Windows.Forms.TextBox
|
|
$textBox2 = New-Object System.Windows.Forms.TextBox
|
|
$backgroundWorker1 = New-Object System.ComponentModel.BackgroundWorker
|
|
$button2 = New-Object System.Windows.Forms.Button
|
|
$nordToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
|
|
#
|
|
# tabControl1
|
|
#
|
|
$tabControl1.Controls.Add($tabPage1)
|
|
$tabControl1.Controls.Add($tabPage2)
|
|
$tabControl1.Controls.Add($tabPage3)
|
|
$tabControl1.Location = New-Object System.Drawing.Point(0, 26)
|
|
$tabControl1.Name = "tabControl1"
|
|
$tabControl1.SelectedIndex = 0
|
|
$tabControl1.Size = New-Object System.Drawing.Size(750, 515)
|
|
$tabControl1.HotTrack = "True"
|
|
$tabControl1.TabIndex = 1
|
|
$tabControl1.Appearance = "FlatButtons"
|
|
#
|
|
# tabPage1
|
|
#
|
|
$tabPage1.Controls.Add($Clear)
|
|
$tabPage1.Controls.Add($groupBox3)
|
|
$tabPage1.Controls.Add($EmailBox)
|
|
$tabPage1.Controls.Add($groupBox1)
|
|
$tabPage1.Location = New-Object System.Drawing.Point(4, 22)
|
|
$tabPage1.Name = "tabPage1"
|
|
$tabPage1.Padding = New-Object System.Windows.Forms.Padding(3)
|
|
$tabPage1.Size = New-Object System.Drawing.Size(742, 489)
|
|
$tabPage1.TabIndex = 0
|
|
$tabPage1.Text = "User Modules"
|
|
$tabPage1.UseVisualStyleBackColor = $true
|
|
#
|
|
# Clear
|
|
#
|
|
$Clear.Location = New-Object System.Drawing.Point(8, 272)
|
|
$Clear.Name = "Clear"
|
|
$Clear.Size = New-Object System.Drawing.Size(139, 23)
|
|
$Clear.TabIndex = 3
|
|
$Clear.Text = "Clear Search"
|
|
$Clear.UseVisualStyleBackColor = $true
|
|
#
|
|
# groupBox3
|
|
#
|
|
$groupBox3.Controls.Add($GMBox)
|
|
$groupBox3.Location = New-Object System.Drawing.Point(463, 6)
|
|
$groupBox3.Name = "groupBox3"
|
|
$groupBox3.Size = New-Object System.Drawing.Size(267, 476)
|
|
$groupBox3.TabIndex = 2
|
|
$groupBox3.TabStop = $false
|
|
$groupBox3.Text = "Group Memberships"
|
|
#
|
|
# GMBox
|
|
#
|
|
$GMBox.FormattingEnabled = $true
|
|
$GMBox.Location = New-Object System.Drawing.Point(7, 20)
|
|
$GMBox.Name = "GMBox"
|
|
$GMBox.Size = New-Object System.Drawing.Size(254, 446)
|
|
$GMBox.TabIndex = 0
|
|
#
|
|
# EmailBox
|
|
#
|
|
$EmailBox.Controls.Add($label15)
|
|
$EmailBox.Controls.Add($label14)
|
|
$EmailBox.Controls.Add($label13)
|
|
$EmailBox.Controls.Add($label12)
|
|
$EmailBox.Controls.Add($label11)
|
|
$EmailBox.Controls.Add($label10)
|
|
$EmailBox.Controls.Add($label9)
|
|
$EmailBox.Controls.Add($label8)
|
|
$EmailBox.Controls.Add($label7)
|
|
$EmailBox.Controls.Add($label6)
|
|
$EmailBox.Controls.Add($label5)
|
|
$EmailBox.Controls.Add($label4)
|
|
$EmailBox.Controls.Add($label3)
|
|
$EmailBox.Controls.Add($label2)
|
|
$EmailBox.Controls.Add($label1)
|
|
$EmailBox.Controls.Add($VPNBox)
|
|
$EmailBox.Controls.Add($PEBox)
|
|
$EmailBox.Controls.Add($PLSBox)
|
|
$EmailBox.Controls.Add($OCBox)
|
|
$EmailBox.Controls.Add($MEBox)
|
|
$EmailBox.Controls.Add($OUBox)
|
|
$EmailBox.Controls.Add($LLTBox)
|
|
$EmailBox.Controls.Add($LBPBox)
|
|
$EmailBox.Controls.Add($JTBox)
|
|
$EmailBox.Controls.Add($EIDBox)
|
|
$EmailBox.Controls.Add($textBox6)
|
|
$EmailBox.Controls.Add($DNBox)
|
|
$EmailBox.Controls.Add($MyIDBox)
|
|
$EmailBox.Controls.Add($AEBox)
|
|
$EmailBox.Controls.Add($ACDBox)
|
|
$EmailBox.Location = New-Object System.Drawing.Point(153, 6)
|
|
$EmailBox.Name = "EmailBox"
|
|
$EmailBox.Size = New-Object System.Drawing.Size(304, 476)
|
|
$EmailBox.TabIndex = 1
|
|
$EmailBox.TabStop = $false
|
|
$EmailBox.Text = "Account Information"
|
|
#
|
|
# label15
|
|
#
|
|
$label15.AutoSize = $true
|
|
$label15.Location = New-Object System.Drawing.Point(7, 437)
|
|
$label15.Name = "label15"
|
|
$label15.Size = New-Object System.Drawing.Size(57, 13)
|
|
$label15.TabIndex = 29
|
|
$label15.Text = "VPN User:"
|
|
#
|
|
# label14
|
|
#
|
|
$label14.AutoSize = $true
|
|
$label14.Location = New-Object System.Drawing.Point(7, 407)
|
|
$label14.Name = "label14"
|
|
$label14.Size = New-Object System.Drawing.Size(94, 13)
|
|
$label14.TabIndex = 28
|
|
$label14.Text = "Password Expired:"
|
|
#
|
|
# label13
|
|
#
|
|
$label13.AutoSize = $true
|
|
$label13.Location = New-Object System.Drawing.Point(7, 377)
|
|
$label13.Name = "label13"
|
|
$label13.Size = New-Object System.Drawing.Size(98, 13)
|
|
$label13.TabIndex = 27
|
|
$label13.Text = "Password Last Set:"
|
|
#
|
|
# label12
|
|
#
|
|
$label12.AutoSize = $true
|
|
$label12.Location = New-Object System.Drawing.Point(7, 347)
|
|
$label12.Name = "label12"
|
|
$label12.Size = New-Object System.Drawing.Size(76, 13)
|
|
$label12.TabIndex = 26
|
|
$label12.Text = "Outlook Client:"
|
|
#
|
|
# label11
|
|
#
|
|
$label11.AutoSize = $true
|
|
$label11.Location = New-Object System.Drawing.Point(7, 317)
|
|
$label11.Name = "label11"
|
|
$label11.Size = New-Object System.Drawing.Size(69, 13)
|
|
$label11.TabIndex = 25
|
|
$label11.Text = "Mobile Email:"
|
|
#
|
|
# label10
|
|
#
|
|
$label10.AutoSize = $true
|
|
$label10.Location = New-Object System.Drawing.Point(7, 287)
|
|
$label10.Name = "label10"
|
|
$label10.Size = New-Object System.Drawing.Size(99, 13)
|
|
$label10.TabIndex = 24
|
|
$label10.Text = "Organizational Unit:"
|
|
#
|
|
# label9
|
|
#
|
|
$label9.AutoSize = $true
|
|
$label9.Location = New-Object System.Drawing.Point(7, 257)
|
|
$label9.Name = "label9"
|
|
$label9.Size = New-Object System.Drawing.Size(89, 13)
|
|
$label9.TabIndex = 23
|
|
$label9.Text = "Last Logon Time:"
|
|
#
|
|
# label8
|
|
#
|
|
$label8.AutoSize = $true
|
|
$label8.Location = New-Object System.Drawing.Point(7, 227)
|
|
$label8.Name = "label8"
|
|
$label8.Size = New-Object System.Drawing.Size(101, 13)
|
|
$label8.TabIndex = 22
|
|
$label8.Text = "Last Bad Password:"
|
|
#
|
|
# label7
|
|
#
|
|
$label7.AutoSize = $true
|
|
$label7.Location = New-Object System.Drawing.Point(7, 197)
|
|
$label7.Name = "label7"
|
|
$label7.Size = New-Object System.Drawing.Size(50, 13)
|
|
$label7.TabIndex = 21
|
|
$label7.Text = "Job Title:"
|
|
#
|
|
# label6
|
|
#
|
|
$label6.AutoSize = $true
|
|
$label6.Location = New-Object System.Drawing.Point(7, 167)
|
|
$label6.Name = "label6"
|
|
$label6.Size = New-Object System.Drawing.Size(71, 13)
|
|
$label6.TabIndex = 20
|
|
$label6.Text = "Enterprise ID:"
|
|
#
|
|
# label5
|
|
#
|
|
$label5.AutoSize = $true
|
|
$label5.Location = New-Object System.Drawing.Point(7, 137)
|
|
$label5.Name = "label5"
|
|
$label5.Size = New-Object System.Drawing.Size(35, 13)
|
|
$label5.TabIndex = 19
|
|
$label5.Text = "Email:"
|
|
#
|
|
# label4
|
|
#
|
|
$label4.AutoSize = $true
|
|
$label4.Location = New-Object System.Drawing.Point(7, 107)
|
|
$label4.Name = "label4"
|
|
$label4.Size = New-Object System.Drawing.Size(75, 13)
|
|
$label4.TabIndex = 18
|
|
$label4.Text = "Display Name:"
|
|
#
|
|
# label3
|
|
#
|
|
$label3.AutoSize = $true
|
|
$label3.Location = New-Object System.Drawing.Point(7, 77)
|
|
$label3.Name = "label3"
|
|
$label3.Size = New-Object System.Drawing.Size(98, 13)
|
|
$label3.TabIndex = 17
|
|
$label3.Text = "MyIdentity Claimed:"
|
|
#
|
|
# label2
|
|
#
|
|
$label2.AutoSize = $true
|
|
$label2.Location = New-Object System.Drawing.Point(7, 47)
|
|
$label2.Name = "label2"
|
|
$label2.Size = New-Object System.Drawing.Size(92, 13)
|
|
$label2.TabIndex = 16
|
|
$label2.Text = "Account Enabled:"
|
|
#
|
|
# label1
|
|
#
|
|
$label1.AutoSize = $true
|
|
$label1.Location = New-Object System.Drawing.Point(7, 20)
|
|
$label1.Name = "label1"
|
|
$label1.Size = New-Object System.Drawing.Size(118, 13)
|
|
$label1.TabIndex = 15
|
|
$label1.Text = "Account Creation Date:"
|
|
#
|
|
# VPNBox
|
|
#
|
|
$VPNBox.Location = New-Object System.Drawing.Point(128, 437)
|
|
$VPNBox.Name = "VPNBox"
|
|
$VPNBox.ReadOnly = $true
|
|
$VPNBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$VPNBox.TabIndex = 14
|
|
#
|
|
# PEBox
|
|
#
|
|
$PEBox.Location = New-Object System.Drawing.Point(128, 407)
|
|
$PEBox.Name = "PEBox"
|
|
$PEBox.ReadOnly = $true
|
|
$PEBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$PEBox.TabIndex = 13
|
|
#
|
|
# PLSBox
|
|
#
|
|
$PLSBox.Location = New-Object System.Drawing.Point(128, 377)
|
|
$PLSBox.Name = "PLSBox"
|
|
$PLSBox.ReadOnly = $true
|
|
$PLSBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$PLSBox.TabIndex = 12
|
|
#
|
|
# OCBox
|
|
#
|
|
$OCBox.Location = New-Object System.Drawing.Point(128, 347)
|
|
$OCBox.Name = "OCBox"
|
|
$OCBox.ReadOnly = $true
|
|
$OCBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$OCBox.TabIndex = 11
|
|
#
|
|
# MEBox
|
|
#
|
|
$MEBox.Location = New-Object System.Drawing.Point(128, 317)
|
|
$MEBox.Name = "MEBox"
|
|
$MEBox.ReadOnly = $true
|
|
$MEBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$MEBox.TabIndex = 10
|
|
#
|
|
# OUBox
|
|
#
|
|
$OUBox.Location = New-Object System.Drawing.Point(128, 287)
|
|
$OUBox.Name = "OUBox"
|
|
$OUBox.ReadOnly = $true
|
|
$OUBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$OUBox.TabIndex = 9
|
|
#
|
|
# LLTBox
|
|
#
|
|
$LLTBox.Location = New-Object System.Drawing.Point(128, 257)
|
|
$LLTBox.Name = "LLTBox"
|
|
$LLTBox.ReadOnly = $true
|
|
$LLTBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$LLTBox.TabIndex = 8
|
|
#
|
|
# LBPBox
|
|
#
|
|
$LBPBox.Location = New-Object System.Drawing.Point(128, 227)
|
|
$LBPBox.Name = "LBPBox"
|
|
$LBPBox.ReadOnly = $true
|
|
$LBPBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$LBPBox.TabIndex = 7
|
|
#
|
|
# JTBox
|
|
#
|
|
$JTBox.Location = New-Object System.Drawing.Point(128, 197)
|
|
$JTBox.Name = "JTBox"
|
|
$JTBox.ReadOnly = $true
|
|
$JTBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$JTBox.TabIndex = 6
|
|
#
|
|
# EIDBox
|
|
#
|
|
$EIDBox.Location = New-Object System.Drawing.Point(128, 167)
|
|
$EIDBox.Name = "EIDBox"
|
|
$EIDBox.ReadOnly = $true
|
|
$EIDBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$EIDBox.TabIndex = 5
|
|
#
|
|
# textBox6
|
|
#
|
|
$textBox6.Location = New-Object System.Drawing.Point(128, 137)
|
|
$textBox6.Name = "textBox6"
|
|
$textBox6.ReadOnly = $true
|
|
$textBox6.Size = New-Object System.Drawing.Size(165, 20)
|
|
$textBox6.TabIndex = 4
|
|
#
|
|
# DNBox
|
|
#
|
|
$DNBox.Location = New-Object System.Drawing.Point(128, 107)
|
|
$DNBox.Name = "DNBox"
|
|
$DNBox.ReadOnly = $true
|
|
$DNBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$DNBox.TabIndex = 3
|
|
#
|
|
# MyIDBox
|
|
#
|
|
$MyIDBox.Location = New-Object System.Drawing.Point(128, 77)
|
|
$MyIDBox.Name = "MyIDBox"
|
|
$MyIDBox.ReadOnly = $true
|
|
$MyIDBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$MyIDBox.TabIndex = 2
|
|
#
|
|
# AEBox
|
|
#
|
|
$AEBox.Location = New-Object System.Drawing.Point(128, 47)
|
|
$AEBox.Name = "AEBox"
|
|
$AEBox.ReadOnly = $true
|
|
$AEBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$AEBox.TabIndex = 1
|
|
#
|
|
# ACDBox
|
|
#
|
|
$ACDBox.Cursor = [System.Windows.Forms.Cursors]::IBeam
|
|
$ACDBox.Location = New-Object System.Drawing.Point(128, 17)
|
|
$ACDBox.Name = "ACDBox"
|
|
$ACDBox.ReadOnly = $true
|
|
$ACDBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$ACDBox.TabIndex = 0
|
|
#
|
|
# groupBox1
|
|
#
|
|
$groupBox1.Controls.Add($Search)
|
|
$groupBox1.Controls.Add($UNBox)
|
|
$groupBox1.Controls.Add($radioButton3)
|
|
$groupBox1.Controls.Add($radioButton1)
|
|
$groupBox1.Location = New-Object System.Drawing.Point(8, 6)
|
|
$groupBox1.Name = "groupBox1"
|
|
$groupBox1.Size = New-Object System.Drawing.Size(139, 260)
|
|
$groupBox1.TabIndex = 0
|
|
$groupBox1.TabStop = $false
|
|
$groupBox1.Text = "Search User"
|
|
#
|
|
# Search
|
|
#
|
|
$Search.Location = New-Object System.Drawing.Point(7, 117)
|
|
$Search.Name = "Search"
|
|
$Search.Size = New-Object System.Drawing.Size(120, 23)
|
|
$Search.TabIndex = 4
|
|
$Search.Text = "Search"
|
|
$Search.UseVisualStyleBackColor = $true
|
|
#
|
|
# UNBox
|
|
#
|
|
$UNBox.Location = New-Object System.Drawing.Point(7, 90)
|
|
$UNBox.Name = "UNBox"
|
|
$UNBox.Size = New-Object System.Drawing.Size(122, 20)
|
|
$UNBox.TabIndex = 3
|
|
#
|
|
# radioButton3
|
|
#
|
|
$radioButton3.AutoSize = $true
|
|
$radioButton3.Location = New-Object System.Drawing.Point(7, 43)
|
|
$radioButton3.Name = "radioButton3"
|
|
$radioButton3.Size = New-Object System.Drawing.Size(122, 17)
|
|
$radioButton3.TabIndex = 2
|
|
$radioButton3.Text = "Lastname"
|
|
$radioButton3.UseVisualStyleBackColor = $true
|
|
#
|
|
# radioButton2
|
|
#
|
|
$radioButton2.AutoSize = $true
|
|
$radioButton2.Location = New-Object System.Drawing.Point(7, 43)
|
|
$radioButton2.Name = "radioButton2"
|
|
$radioButton2.Size = New-Object System.Drawing.Size(84, 17)
|
|
$radioButton2.TabIndex = 1
|
|
$radioButton2.Text = "UPN / Email"
|
|
$radioButton2.UseVisualStyleBackColor = $true
|
|
#
|
|
# radioButton1
|
|
#
|
|
$radioButton1.AutoSize = $true
|
|
$radioButton1.Checked = $true
|
|
$radioButton1.Location = New-Object System.Drawing.Point(7, 20)
|
|
$radioButton1.Name = "radioButton1"
|
|
$radioButton1.Size = New-Object System.Drawing.Size(73, 17)
|
|
$radioButton1.TabIndex = 0
|
|
$radioButton1.TabStop = $true
|
|
$radioButton1.Text = "Username"
|
|
$radioButton1.UseVisualStyleBackColor = $true
|
|
#
|
|
# tabPage2
|
|
#
|
|
$tabPage2.Controls.Add($groupBox6)
|
|
$tabPage2.Controls.Add($groupBox2)
|
|
$tabPage2.Location = New-Object System.Drawing.Point(4, 22)
|
|
$tabPage2.Name = "tabPage2"
|
|
$tabPage2.Padding = New-Object System.Windows.Forms.Padding(3)
|
|
$tabPage2.Size = New-Object System.Drawing.Size(742, 489)
|
|
$tabPage2.TabIndex = 1
|
|
$tabPage2.Text = "Computer Modules"
|
|
$tabPage2.UseVisualStyleBackColor = $true
|
|
#
|
|
# groupBox6
|
|
#
|
|
$groupBox6.Controls.Add($label21)
|
|
$groupBox6.Controls.Add($numericUpDown1)
|
|
$groupBox6.Controls.Add($label20)
|
|
$groupBox6.Location = New-Object System.Drawing.Point(8, 396)
|
|
$groupBox6.Name = "groupBox6"
|
|
$groupBox6.Size = New-Object System.Drawing.Size(724, 87)
|
|
$groupBox6.TabIndex = 1
|
|
$groupBox6.TabStop = $false
|
|
$groupBox6.Text = "Options"
|
|
#
|
|
# label21
|
|
#
|
|
$label21.AutoSize = $true
|
|
$label21.Location = New-Object System.Drawing.Point(136, 36)
|
|
$label21.Name = "label21"
|
|
$label21.Size = New-Object System.Drawing.Size(49, 13)
|
|
$label21.TabIndex = 36
|
|
$label21.Text = "Seconds"
|
|
#
|
|
# numericUpDown1
|
|
#
|
|
$numericUpDown1.Location = New-Object System.Drawing.Point(10, 32)
|
|
$numericUpDown1.Maximum = "5"
|
|
$numericUpDown1.Minimum = "1"
|
|
$numericUpDown1.Name = "numericUpDown1"
|
|
$numericUpDown1.Size = New-Object System.Drawing.Size(120, 20)
|
|
$numericUpDown1.TabIndex = 34
|
|
$numericUpDown1.Text = "2"
|
|
#
|
|
# label20
|
|
#
|
|
$label20.AutoSize = $true
|
|
$label20.Location = New-Object System.Drawing.Point(4, 16)
|
|
$label20.Name = "label20"
|
|
$label20.Size = New-Object System.Drawing.Size(151, 13)
|
|
$label20.TabIndex = 35
|
|
$label20.Text = "Timeout for Computer Modules"
|
|
#
|
|
# groupBox2
|
|
#
|
|
$groupBox2.Controls.Add($AutoClearCheck)
|
|
$groupBox2.Controls.Add($label19)
|
|
$groupBox2.Controls.Add($richTextBox1)
|
|
$groupBox2.Controls.Add($REBOOTButton)
|
|
$groupBox2.Controls.Add($REMOTEButton)
|
|
$groupBox2.Controls.Add($LAPSButton)
|
|
$groupBox2.Controls.Add($CLUButton)
|
|
$groupBox2.Controls.Add($CFEButton)
|
|
$groupBox2.Controls.Add($textBox1)
|
|
$groupBox2.Controls.Add($label18)
|
|
$groupBox2.Location = New-Object System.Drawing.Point(8, 6)
|
|
$groupBox2.Name = "groupBox2"
|
|
$groupBox2.Size = New-Object System.Drawing.Size(722, 384)
|
|
$groupBox2.TabIndex = 0
|
|
$groupBox2.TabStop = $false
|
|
$groupBox2.Text = "Computer Modules"
|
|
#
|
|
# AutoClearCheck
|
|
#
|
|
$AutoClearCheck.AutoSize = $true
|
|
$AutoClearCheck.Location = New-Object System.Drawing.Point(381, 348)
|
|
$AutoClearCheck.Name = "AutoClearCheck"
|
|
$AutoClearCheck.Size = New-Object System.Drawing.Size(199, 17)
|
|
$AutoClearCheck.TabIndex = 33
|
|
$AutoClearCheck.Text = "Auto Clear Computer Information Box"
|
|
$AutoClearCheck.UseVisualStyleBackColor = $true
|
|
#
|
|
# label19
|
|
#
|
|
$label19.AutoSize = $true
|
|
$label19.Location = New-Object System.Drawing.Point(378, 16)
|
|
$label19.Name = "label19"
|
|
$label19.Size = New-Object System.Drawing.Size(110, 13)
|
|
$label19.TabIndex = 32
|
|
$label19.Text = "Computer Information:"
|
|
#
|
|
# richTextBox1
|
|
#
|
|
$richTextBox1.Cursor = [System.Windows.Forms.Cursors]::IBeam
|
|
$richTextBox1.Location = New-Object System.Drawing.Point(381, 36)
|
|
$richTextBox1.Name = "richTextBox1"
|
|
$richTextBox1.ReadOnly = $true
|
|
$richTextBox1.ScrollBars = [System.Windows.Forms.RichTextBoxScrollBars]::ForcedVertical
|
|
$richTextBox1.Size = New-Object System.Drawing.Size(335, 306)
|
|
$richTextBox1.TabIndex = 31
|
|
$richTextBox1.Text = ""
|
|
#
|
|
# REBOOTButton
|
|
#
|
|
$REBOOTButton.Location = New-Object System.Drawing.Point(172, 155)
|
|
$REBOOTButton.Name = "REBOOTButton"
|
|
$REBOOTButton.Size = New-Object System.Drawing.Size(200, 30)
|
|
$REBOOTButton.TabIndex = 27
|
|
$REBOOTButton.Text = "Reboot w/ Auto Remote In"
|
|
$REBOOTButton.UseVisualStyleBackColor = $true
|
|
$REBOOTButton.Add_Click(
|
|
{
|
|
REBOOTREMOTE
|
|
}
|
|
)
|
|
#
|
|
# REMOTEButton
|
|
#
|
|
$REMOTEButton.Location = New-Object System.Drawing.Point(172, 119)
|
|
$REMOTEButton.Name = "REMOTEButton"
|
|
$REMOTEButton.Size = New-Object System.Drawing.Size(200, 30)
|
|
$REMOTEButton.TabIndex = 26
|
|
$REMOTEButton.Text = "Remote to Computer"
|
|
$REMOTEButton.UseVisualStyleBackColor = $true
|
|
$REMOTEButton.Add_Click(
|
|
{
|
|
REMOTE
|
|
}
|
|
)
|
|
#
|
|
# LAPSButton
|
|
#
|
|
$LAPSButton.Location = New-Object System.Drawing.Point(172, 83)
|
|
$LAPSButton.Name = "LAPSButton"
|
|
$LAPSButton.Size = New-Object System.Drawing.Size(200, 30)
|
|
$LAPSButton.TabIndex = 25
|
|
$LAPSButton.Text = "LAPS Password Viewer"
|
|
$LAPSButton.UseVisualStyleBackColor = $true
|
|
$LAPSButton.Add_Click(
|
|
{
|
|
LAPS
|
|
}
|
|
)
|
|
#
|
|
# CLUButton
|
|
#
|
|
$CLUButton.Location = New-Object System.Drawing.Point(172, 47)
|
|
$CLUButton.Name = "CLUButton"
|
|
$CLUButton.Size = New-Object System.Drawing.Size(200, 30)
|
|
$CLUButton.TabIndex = 24
|
|
$CLUButton.Text = "Current Logged on User"
|
|
$CLUButton.UseVisualStyleBackColor = $true
|
|
$CLUButton.Add_Click(
|
|
{
|
|
CLU
|
|
}
|
|
)
|
|
#
|
|
# CFEButton
|
|
#
|
|
$CFEButton.Location = New-Object System.Drawing.Point(172, 11)
|
|
$CFEButton.Name = "CFEButton"
|
|
$CFEButton.Size = New-Object System.Drawing.Size(200, 30)
|
|
$CFEButton.TabIndex = 23
|
|
$CFEButton.Text = "Computer File Explorer"
|
|
$CFEButton.UseVisualStyleBackColor = $true
|
|
$CFEButton.Add_Click(
|
|
{
|
|
CFE
|
|
}
|
|
)
|
|
#
|
|
# textBox1
|
|
#
|
|
$textBox1.Location = New-Object System.Drawing.Point(6, 36)
|
|
$textBox1.Name = "textBox1"
|
|
$textBox1.Size = New-Object System.Drawing.Size(160, 20)
|
|
$textBox1.TabIndex = 1
|
|
#
|
|
# label18
|
|
#
|
|
$label18.AutoSize = $true
|
|
$label18.Location = New-Object System.Drawing.Point(7, 20)
|
|
$label18.Name = "label18"
|
|
$label18.Size = New-Object System.Drawing.Size(98, 13)
|
|
$label18.TabIndex = 0
|
|
$label18.Text = "Computer Tag / IP:"
|
|
#
|
|
# tabPage3
|
|
#
|
|
$tabPage3.Controls.Add($webBrowser1)
|
|
$tabPage3.Location = New-Object System.Drawing.Point(4, 22)
|
|
$tabPage3.Name = "tabPage3"
|
|
$tabPage3.Padding = New-Object System.Windows.Forms.Padding(3)
|
|
$tabPage3.Size = New-Object System.Drawing.Size(742, 489)
|
|
$tabPage3.TabIndex = 2
|
|
$tabPage3.Text = "My Identity"
|
|
$tabPage3.UseVisualStyleBackColor = $true
|
|
#
|
|
# webBrowser1
|
|
#
|
|
$webBrowser1.Dock = [System.Windows.Forms.DockStyle]::Fill
|
|
$webBrowser1.Location = New-Object System.Drawing.Point(3, 3)
|
|
$webBrowser1.MinimumSize = New-Object System.Drawing.Size(20, 20)
|
|
$webBrowser1.Name = "webBrowser1"
|
|
$webBrowser1.Size = New-Object System.Drawing.Size(736, 483)
|
|
$webBrowser1.TabIndex = 0
|
|
$webBrowser1.Url = New-Object System.Uri("https://myidentity.wvumedicine.org")
|
|
$webBrowser1.ScriptErrorsSuppressed = "true"
|
|
#
|
|
# toolStrip1
|
|
#
|
|
$toolStrip1.Items.AddRange(@(
|
|
$toolStripDropDownButton1,
|
|
$toolStripDropDownButton2,
|
|
$toolStripDropDownButton3))
|
|
$toolStrip1.Location = New-Object System.Drawing.Point(0, 0)
|
|
$toolStrip1.Name = "toolStrip1"
|
|
$toolStrip1.Size = New-Object System.Drawing.Size(984, 25)
|
|
$toolStrip1.TabIndex = 2
|
|
$toolStrip1.Text = "toolStrip1"
|
|
#
|
|
# toolStripDropDownButton1
|
|
#
|
|
$toolStripDropDownButton1.DisplayStyle = [System.Windows.Forms.ToolStripItemDisplayStyle]::Text
|
|
$toolStripDropDownButton1.DropDownItems.AddRange(@(
|
|
$closeToolStripMenuItem))
|
|
$toolStripDropDownButton1.Image = [System.Drawing.Image] $Resources["toolStripDropDownButton1.Image"]
|
|
$toolStripDropDownButton1.ImageTransparentColor = [System.Drawing.Color]::Magenta
|
|
$toolStripDropDownButton1.Name = "toolStripDropDownButton1"
|
|
$toolStripDropDownButton1.Size = New-Object System.Drawing.Size(38, 22)
|
|
$toolStripDropDownButton1.Text = "File"
|
|
#
|
|
# closeToolStripMenuItem
|
|
#
|
|
$closeToolStripMenuItem.Name = "closeToolStripMenuItem"
|
|
$closeToolStripMenuItem.Size = New-Object System.Drawing.Size(93, 22)
|
|
$closeToolStripMenuItem.Text = "Exit"
|
|
$closeToolStripMenuItem.Add_Click(
|
|
{
|
|
# Release of resources
|
|
$Reader.Close()
|
|
# Release the Form
|
|
$Form1.Dispose()
|
|
}
|
|
)
|
|
#
|
|
# toolStripDropDownButton2
|
|
#
|
|
$toolStripDropDownButton2.BackgroundImageLayout = [System.Windows.Forms.ImageLayout]::None
|
|
$toolStripDropDownButton2.DisplayStyle = [System.Windows.Forms.ToolStripItemDisplayStyle]::Text
|
|
$toolStripDropDownButton2.DropDownItems.AddRange(@(
|
|
$themeToolStripMenuItem))
|
|
$toolStripDropDownButton2.Image = [System.Drawing.Image] $Resources["toolStripDropDownButton2.Image"]
|
|
$toolStripDropDownButton2.ImageTransparentColor = [System.Drawing.Color]::Magenta
|
|
$toolStripDropDownButton2.Name = "toolStripDropDownButton2"
|
|
$toolStripDropDownButton2.Size = New-Object System.Drawing.Size(62, 22)
|
|
$toolStripDropDownButton2.Text = "Settings"
|
|
$toolStripDropDownButton2.ToolTipText = "Settings"
|
|
#
|
|
#
|
|
# themeToolStripMenuItem
|
|
#
|
|
$themeToolStripMenuItem.BackgroundImageLayout = [System.Windows.Forms.ImageLayout]::None
|
|
$themeToolStripMenuItem.DropDownItems.AddRange(@(
|
|
$vaporwaveToolStripMenuItem,
|
|
$lightToolStripMenuItem,
|
|
$toolStripMenuItem2,
|
|
$draculaToolStripMenuItem,
|
|
$halloweenToolStripMenuItem,
|
|
$nordToolStripMenuItem,
|
|
$seawaveToolStripMenuItem,
|
|
$solarizedToolStripMenuItem,
|
|
$strawberryToolStripMenuItem,
|
|
$sunsetToolStripMenuItem,
|
|
$seapunkToolStripMenuItem
|
|
))
|
|
$themeToolStripMenuItem.Name = "themeToolStripMenuItem"
|
|
$themeToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$themeToolStripMenuItem.Text = "Theme"
|
|
#
|
|
# lightToolStripMenuItem
|
|
#
|
|
$lightToolStripMenuItem.DisplayStyle = [System.Windows.Forms.ToolStripItemDisplayStyle]::Text
|
|
$lightToolStripMenuItem.Name = "lightToolStripMenuItem"
|
|
$lightToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$lightToolStripMenuItem.Text = "Light"
|
|
#
|
|
# toolStripMenuItem2
|
|
#
|
|
$toolStripMenuItem2.Name = "toolStripMenuItem2"
|
|
$toolStripMenuItem2.Size = New-Object System.Drawing.Size(180, 22)
|
|
$toolStripMenuItem2.Text = "Dark"
|
|
#
|
|
# breezeStripMenuItem2
|
|
#
|
|
$strawberryToolStripMenuItem.Name = "draculaToolStripMenuItem"
|
|
$strawberryToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$strawberryToolStripMenuItem.Text = "Strawberry"
|
|
# solarizedToolStripMenuItem
|
|
#
|
|
$solarizedToolStripMenuItem.Name = "solarizedToolStripMenuItem"
|
|
$solarizedToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$solarizedToolStripMenuItem.Text = "Solarized"
|
|
#
|
|
# draculaToolStripMenuItem
|
|
#
|
|
$draculaToolStripMenuItem.Name = "draculaToolStripMenuItem"
|
|
$draculaToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$draculaToolStripMenuItem.Text = "Dracula"
|
|
#
|
|
# halloweenToolStripMenuItem
|
|
#
|
|
$halloweenToolStripMenuItem.Name = "draculaToolStripMenuItem"
|
|
$halloweenToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$halloweenToolStripMenuItem.Text = "Halloween"
|
|
#
|
|
#vaporWaveToolStripMenu
|
|
#
|
|
$vaporwaveToolStripMenuItem.Name = "vaporwaveToolStripMenuItem"
|
|
$vaporwaveToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$vaporWaveToolStripMenuItem.Text = "Bran"
|
|
#
|
|
#Seapunk Tool Strip Menu
|
|
#
|
|
$seapunkToolStripMenuItem.Name = "seapunkToolStripMenuItem"
|
|
$seapunkToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$seapunkToolStripMenuItem.Text = "Vapor Wave"
|
|
#
|
|
#Seawave Tool Strip Menu
|
|
#
|
|
$seawaveToolStripMenuItem.Name = "seapunkToolStripMenuItem"
|
|
$seawaveToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$seawaveToolStripMenuItem.Text = "Sea Wave"
|
|
#
|
|
#Sunset Tool Strip Menu
|
|
#
|
|
$sunsetToolStripMenuItem.Name = "seapunkToolStripMenuItem"
|
|
$sunsetToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$sunsetToolStripMenuItem.Text = "Sunset"
|
|
#
|
|
# button3
|
|
#
|
|
#
|
|
# Tool Strip Dowp Down 3
|
|
#
|
|
$toolStripDropDownButton3.BackgroundImageLayout = [System.Windows.Forms.ImageLayout]::None
|
|
$toolStripDropDownButton3.DisplayStyle = [System.Windows.Forms.ToolStripItemDisplayStyle]::Text
|
|
$toolStripDropDownButton3.DropDownItems.AddRange(@(
|
|
$hscToolStripMenuItem,
|
|
$irtToolStripMenuItem
|
|
))
|
|
$toolStripDropDownButton3.Image = [System.Drawing.Image] $Resources["toolStripDropDownButton3.Image"]
|
|
$toolStripDropDownButton3.ImageTransparentColor = [System.Drawing.Color]::Magenta
|
|
$toolStripDropDownButton3.Name = "toolStripDropDownButton3"
|
|
$toolStripDropDownButton3.Size = New-Object System.Drawing.Size(62, 22)
|
|
$toolStripDropDownButton3.Text = "Tools"
|
|
$toolStripDropDownButton3.ToolTipText = "Tools"
|
|
#
|
|
# HSC Pass Check Menu Item
|
|
#
|
|
$hscToolStripMenuItem.Name = "closeToolStripMenuItem"
|
|
$hscToolStripMenuItem.Size = New-Object System.Drawing.Size(93, 22)
|
|
$hscToolStripMenuItem.Text = "HSC Password Sync Check"
|
|
$hscToolStripMenuItem.Add_Click(
|
|
{
|
|
}
|
|
)
|
|
#
|
|
# IRT Tools
|
|
#
|
|
$irtToolStripMenuItem.BackgroundImageLayout = [System.Windows.Forms.ImageLayout]::None
|
|
$irtToolStripMenuItem.DropDownItems.AddRange(@(
|
|
$geolocationToolStripMenuItem
|
|
))
|
|
$irtToolStripMenuItem.Name = "themeToolStripMenuItem"
|
|
$irtToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$irtToolStripMenuItem.Text = "IRT Tools"
|
|
#
|
|
# Geolocation API
|
|
#
|
|
$geolocationToolStripMenuItem.Name = "seapunkToolStripMenuItem"
|
|
$geolocationToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$geolocationToolStripMenuItem.Text = "IP Geo-Location API"
|
|
$geolocationToolStripMenuItem.Add_Click(
|
|
{
|
|
geoLocationForm
|
|
}
|
|
)
|
|
#
|
|
# button3
|
|
#
|
|
$button3.Location = New-Object System.Drawing.Point(772, 48)
|
|
$button3.Name = "button3"
|
|
$button3.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button3.TabIndex = 3
|
|
$button3.Text = "Bitlocker"
|
|
$button3.UseVisualStyleBackColor = $true
|
|
$button3.Add_Click(
|
|
{
|
|
Start-Process "https://vm-cfgmgr.wvuhs.com/helpdesk/KeyRecoveryPage.aspx"
|
|
}
|
|
)
|
|
#
|
|
# button4
|
|
#
|
|
$button4.Location = New-Object System.Drawing.Point(772, 84)
|
|
$button4.Name = "button4"
|
|
$button4.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button4.TabIndex = 4
|
|
$button4.Text = "Director"
|
|
$button4.UseVisualStyleBackColor = $true
|
|
$button4.Add_Click(
|
|
{
|
|
Start-Process "https://director.wvuhs.com/"
|
|
}
|
|
)
|
|
#
|
|
# button6
|
|
#
|
|
$button6.Location = New-Object System.Drawing.Point(772, 120)
|
|
$button6.Name = "button6"
|
|
$button6.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button6.TabIndex = 6
|
|
$button6.Text = "HSC IT"
|
|
$button6.UseVisualStyleBackColor = $true
|
|
$button6.Add_Click(
|
|
{
|
|
Start-Process "https://its.hsc.wvu.edu/"
|
|
}
|
|
)
|
|
#
|
|
# button7
|
|
#
|
|
$button7.Location = New-Object System.Drawing.Point(772, 156)
|
|
$button7.Name = "button7"
|
|
$button7.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button7.TabIndex = 7
|
|
$button7.Text = "Imprivata"
|
|
$button7.UseVisualStyleBackColor = $true
|
|
$button7.Add_Click(
|
|
{
|
|
Start-Process "https://172.17.251.181/sso/administrator.html"
|
|
}
|
|
)
|
|
#
|
|
# button8
|
|
#
|
|
$button8.Location = New-Object System.Drawing.Point(772, 192)
|
|
$button8.Name = "button8"
|
|
$button8.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button8.TabIndex = 8
|
|
$button8.Text = "ISE"
|
|
$button8.UseVisualStyleBackColor = $true
|
|
$button8.Add_Click(
|
|
{
|
|
Start-Process "https://u-pise1-uhc.wvuhs.com/admin/login.jsp"
|
|
}
|
|
)
|
|
#
|
|
# button9
|
|
#
|
|
$button9.Location = New-Object System.Drawing.Point(772, 228)
|
|
$button9.Name = "button9"
|
|
$button9.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button9.TabIndex = 9
|
|
$button9.Text = "Kronos"
|
|
$button9.UseVisualStyleBackColor = $true
|
|
$button9.Add_Click(
|
|
{
|
|
Start-Process "https://kronos.wvumedicine.org/wfc/logon"
|
|
}
|
|
)
|
|
#
|
|
# button10
|
|
#
|
|
$button10.Location = New-Object System.Drawing.Point(772, 264)
|
|
$button10.Name = "button10"
|
|
$button10.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button10.TabIndex = 10
|
|
$button10.Text = "Kuiper"
|
|
$button10.UseVisualStyleBackColor = $true
|
|
$button10.Add_Click(
|
|
{
|
|
Start-Process "https://kuiper.wvumedicine.org/Kuiper/Account/Login?ReturnUrl=%2fKuiper%2f"
|
|
}
|
|
)
|
|
#
|
|
# button11
|
|
#
|
|
$button11.Location = New-Object System.Drawing.Point(772, 300)
|
|
$button11.Name = "button11"
|
|
$button11.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button11.TabIndex = 11
|
|
$button11.Text = "One Content"
|
|
$button11.UseVisualStyleBackColor = $true
|
|
$button11.Add_Click(
|
|
{
|
|
Start-Process "https://ocweb.wvuhs.com/oc/#tasklist"
|
|
}
|
|
)
|
|
#
|
|
# button12
|
|
#
|
|
$button12.Location = New-Object System.Drawing.Point(772, 336)
|
|
$button12.Name = "button12"
|
|
$button12.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button12.TabIndex = 12
|
|
$button12.Text = "Printer Logic"
|
|
$button12.UseVisualStyleBackColor = $true
|
|
$button12.Add_Click(
|
|
{
|
|
Start-Process "https://i-hvprinterlogic.wvuhs.com/admin/"
|
|
}
|
|
)
|
|
#
|
|
# button14
|
|
#
|
|
$button14.Location = New-Object System.Drawing.Point(772, 372)
|
|
$button14.Name = "button14"
|
|
$button14.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button14.TabIndex = 14
|
|
$button14.Text = "Site Scan"
|
|
$button14.UseVisualStyleBackColor = $true
|
|
$button14.Add_Click(
|
|
{
|
|
Start-Process "http://172.17.253.65/"
|
|
}
|
|
)
|
|
#
|
|
# button15
|
|
#
|
|
$button15.Location = New-Object System.Drawing.Point(772, 408)
|
|
$button15.Name = "button15"
|
|
$button15.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button15.TabIndex = 15
|
|
$button15.Text = "SnapComm"
|
|
$button15.UseVisualStyleBackColor = $true
|
|
$button15.Add_Click(
|
|
{
|
|
Start-Process "https://login.snapcomms.com/#/"
|
|
}
|
|
)
|
|
#
|
|
# button16
|
|
#
|
|
$button16.Location = New-Object System.Drawing.Point(772, 444)
|
|
$button16.Name = "button16"
|
|
$button16.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button16.TabIndex = 16
|
|
$button16.Text = "TelecommNG"
|
|
$button16.UseVisualStyleBackColor = $true
|
|
#
|
|
# button17
|
|
#
|
|
$button17.Location = New-Object System.Drawing.Point(772, 480)
|
|
$button17.Name = "button17"
|
|
$button17.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button17.TabIndex = 17
|
|
$button17.Text = "UMS"
|
|
$button17.UseVisualStyleBackColor = $true
|
|
$button17.Add_Click(
|
|
{
|
|
Start-Process "https://i-h-igel2.wvuhs.com:8443/webapp/#/login?returnUrl=%2Fhome"
|
|
}
|
|
)
|
|
#
|
|
# button18
|
|
#
|
|
$button18.Location = New-Object System.Drawing.Point(772, 516)
|
|
$button18.Name = "button18"
|
|
$button18.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button18.TabIndex = 18
|
|
$button18.Text = "Unify"
|
|
$button18.UseVisualStyleBackColor = $true
|
|
$button18.Add_Click(
|
|
{
|
|
Start-Process "https://172.17.180.133/management/portal/"
|
|
}
|
|
)
|
|
#
|
|
# button19
|
|
#
|
|
$button19.Location = New-Object System.Drawing.Point(772, 552)
|
|
$button19.Name = "button19"
|
|
$button19.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button19.TabIndex = 19
|
|
$button19.Text = "Whats Up"
|
|
$button19.UseVisualStyleBackColor = $true
|
|
$button19.Add_Click(
|
|
{
|
|
Start-Process "http://dashboard/callcenter/"
|
|
}
|
|
)
|
|
#
|
|
# Incident
|
|
#
|
|
$Incident.Location = New-Object System.Drawing.Point(6, 19)
|
|
$Incident.Name = "Incident"
|
|
$Incident.Size = New-Object System.Drawing.Size(171, 30)
|
|
$Incident.TabIndex = 20
|
|
$Incident.Text = "New Incident"
|
|
$Incident.UseVisualStyleBackColor = $true
|
|
$Incident.Add_Click(
|
|
{
|
|
$url = "https://wvumhelp.cherwellondemand.com/CherwellClient/Access/Command/Application.NewBusOb?Name=Incident"
|
|
Start-Process $url
|
|
}
|
|
)
|
|
#
|
|
# groupBox4
|
|
#
|
|
$groupBox4.Controls.Add($IncidentBox)
|
|
$groupBox4.Controls.Add($label17)
|
|
$groupBox4.Controls.Add($CallerNameBox)
|
|
$groupBox4.Controls.Add($label16)
|
|
$groupBox4.Controls.Add($Incident)
|
|
$groupBox4.Location = New-Object System.Drawing.Point(4, 543)
|
|
$groupBox4.Name = "groupBox4"
|
|
$groupBox4.Size = New-Object System.Drawing.Size(446, 114)
|
|
$groupBox4.TabIndex = 21
|
|
$groupBox4.TabStop = $false
|
|
$groupBox4.Text = "Cherwell"
|
|
#
|
|
# IncidentBox
|
|
#
|
|
$IncidentBox.Location = New-Object System.Drawing.Point(195, 25)
|
|
$IncidentBox.Name = "IncidentBox"
|
|
$IncidentBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$IncidentBox.TabIndex = 32
|
|
$IncidentBox.Add_KeyDown(
|
|
{
|
|
if ($_.KeyCode -eq 'Enter') {
|
|
Start-Process ("https://wvumhelp.cherwellondemand.com/CherwellClient/access/Queries.GoToRecord/" + $IncidentBox.Text + "?BusObID=Incident")
|
|
$IncidentBox.Clear()
|
|
}
|
|
}
|
|
)
|
|
#
|
|
# label17
|
|
#
|
|
$label17.AutoSize = $true
|
|
$label17.Location = New-Object System.Drawing.Point(192, 9)
|
|
$label17.Name = "label17"
|
|
$label17.Size = New-Object System.Drawing.Size(144, 13)
|
|
$label17.TabIndex = 31
|
|
$label17.Text = "Incident ID / General Search"
|
|
#
|
|
# CallerNameBox
|
|
#
|
|
$CallerNameBox.Location = New-Object System.Drawing.Point(12, 78)
|
|
$CallerNameBox.Name = "CallerNameBox"
|
|
$CallerNameBox.Size = New-Object System.Drawing.Size(165, 20)
|
|
$CallerNameBox.TabIndex = 30
|
|
$CallerNameBox.Add_KeyDown({
|
|
if ($_.KeyCode -eq 'Enter') {
|
|
Start-Process ("https://wvumhelp.cherwellondemand.com/CherwellClient/access/Queries.GoToRecord/" + $CallerNameBox.Text + "?BusObID=CustomerInternal")
|
|
$CallerNameBox.Clear()
|
|
}
|
|
})
|
|
#
|
|
# label16
|
|
#
|
|
$label16.AutoSize = $true
|
|
$label16.Location = New-Object System.Drawing.Point(12, 62)
|
|
$label16.Name = "label16"
|
|
$label16.Size = New-Object System.Drawing.Size(123, 13)
|
|
$label16.TabIndex = 21
|
|
$label16.Text = "Caller Name / Username"
|
|
#
|
|
# groupBox5
|
|
#
|
|
$groupBox5.Controls.Add($label23)
|
|
$groupBox5.Controls.Add($label22)
|
|
$groupBox5.Controls.Add($textBox3)
|
|
$groupBox5.Controls.Add($textBox2)
|
|
$groupBox5.Location = New-Object System.Drawing.Point(456, 543)
|
|
$groupBox5.Name = "groupBox5"
|
|
$groupBox5.Size = New-Object System.Drawing.Size(290, 114)
|
|
$groupBox5.TabIndex = 22
|
|
$groupBox5.TabStop = $false
|
|
$groupBox5.Text = "Knowledge Base"
|
|
#
|
|
# label23
|
|
#
|
|
$label23.AutoSize = $true
|
|
$label23.Location = New-Object System.Drawing.Point(6, 62)
|
|
$label23.Name = "label23"
|
|
$label23.Size = New-Object System.Drawing.Size(64, 13)
|
|
$label23.TabIndex = 33
|
|
$label23.Text = "Title Search"
|
|
#
|
|
# label22
|
|
#
|
|
$label22.AutoSize = $true
|
|
$label22.Location = New-Object System.Drawing.Point(6, 16)
|
|
$label22.Name = "label22"
|
|
$label22.Size = New-Object System.Drawing.Size(81, 13)
|
|
$label22.TabIndex = 33
|
|
$label22.Text = "General Search"
|
|
#
|
|
# textBox3
|
|
#
|
|
$textBox3.Location = New-Object System.Drawing.Point(6, 79)
|
|
$textBox3.Name = "textBox3"
|
|
$textBox3.Size = New-Object System.Drawing.Size(165, 20)
|
|
$textBox3.TabIndex = 34
|
|
$textBox3.Add_KeyDown({
|
|
if ($_.KeyCode -eq 'Enter') {
|
|
Start-Process ("https://wvuhsc.sharepoint.com/sites/WVUMITHelpDesk/Knowledge%20Base/Forms/AllItems.aspx?view=7&q=title:" + $textbox3.Text)
|
|
$textbox3.Clear()
|
|
}
|
|
})
|
|
#
|
|
# textBox2
|
|
#
|
|
$textBox2.Location = New-Object System.Drawing.Point(6, 33)
|
|
$textBox2.Name = "textBox2"
|
|
$textBox2.Size = New-Object System.Drawing.Size(165, 20)
|
|
$textBox2.TabIndex = 33
|
|
$textbox2.Add_KeyDown(
|
|
{
|
|
if ($_.KeyCode -eq 'Enter') {
|
|
Start-Process ("https://wvuhsc.sharepoint.com/sites/WVUMITHelpDesk/Knowledge%20Base/Forms/AllItems.aspx?view=7&q=" + $textbox2.Text)
|
|
$textbox3.Clear()
|
|
}
|
|
}
|
|
)
|
|
#
|
|
# button2
|
|
#
|
|
$button2.Location = New-Object System.Drawing.Point(772, 588)
|
|
$button2.Name = "button2"
|
|
$button2.Size = New-Object System.Drawing.Size(200, 30)
|
|
$button2.TabIndex = 23
|
|
$button2.Text = "Workday"
|
|
$button2.UseVisualStyleBackColor = $true
|
|
$button2.Add_Click(
|
|
{
|
|
Start-Process "https://hronesource.org"
|
|
}
|
|
)
|
|
#
|
|
# nordToolStripMenuItem
|
|
#
|
|
$nordToolStripMenuItem.Name = "nordToolStripMenuItem"
|
|
$nordToolStripMenuItem.Size = New-Object System.Drawing.Size(180, 22)
|
|
$nordToolStripMenuItem.Text = "Nord"
|
|
#
|
|
# Form1
|
|
#
|
|
$Form1.ClientSize = New-Object System.Drawing.Size(984, 661)
|
|
$Form1.Controls.Add($button2)
|
|
$Form1.Controls.Add($groupBox5)
|
|
$Form1.Controls.Add($groupBox4)
|
|
$Form1.Controls.Add($button19)
|
|
$Form1.Controls.Add($button18)
|
|
$Form1.Controls.Add($button17)
|
|
$Form1.Controls.Add($button16)
|
|
$Form1.Controls.Add($button15)
|
|
$Form1.Controls.Add($button14)
|
|
$Form1.Controls.Add($button12)
|
|
$Form1.Controls.Add($button11)
|
|
$Form1.Controls.Add($button10)
|
|
$Form1.Controls.Add($button9)
|
|
$Form1.Controls.Add($button8)
|
|
$Form1.Controls.Add($button7)
|
|
$Form1.Controls.Add($button6)
|
|
$Form1.Controls.Add($button4)
|
|
$Form1.Controls.Add($button3)
|
|
$Form1.Controls.Add($toolStrip1)
|
|
$Form1.Controls.Add($tabControl1)
|
|
$Form1.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedDialog
|
|
$Form1.MaximizeBox = $false
|
|
$Form1.Name = "Form1"
|
|
$Form1.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterParent
|
|
$Form1.Text = "CHAMP - 20241231"
|
|
Function preflight () {
|
|
$preflightCounter = [int] 0
|
|
$preflightDependancies = ""
|
|
Write-Host "Running Pre-Flight checks...`n"
|
|
$currentVersion = "20241231"
|
|
$version = Invoke-WebRequest -URI https://git.racooncity.org/brotoskyj/CHAMP/raw/branch/master/version.txt | Select-Object -ExpandProperty Content
|
|
Write-Host "Version Check:"
|
|
Write-Host "Local Version: $currentVersion"
|
|
if ( $version -gt $currentVersion ) {
|
|
Write-Host "Latest Version $version"
|
|
Write-Host -ForegroundColor "Red" "[ ] Up to Date`n"
|
|
$preflightDependancies = "Newer Version Available`n" + $preflightDependancies
|
|
}
|
|
else {
|
|
Write-Host "Latest Version: $version"
|
|
Write-Host -ForegroundColor "Green" "[X] Up to Date`n"
|
|
$preflightCounter++
|
|
}
|
|
Start-Sleep 1
|
|
Write-Host "Checking Dependancies:"
|
|
$rsat = Get-WMIobject -Class Win32_quickfixengineering | Select-Object -ExpandProperty HotFixID
|
|
if (( $rsat -contains "*KB2693643*") -or (!(Get-Module -ListAvailable -Name ActiveDirectory))) {
|
|
Write-Host -ForegroundColor "Red" "Powershell Active Directory Module`n"
|
|
$preflightDependancies = "Remote Server Administration Tools`n" + $preflightDependancies
|
|
}
|
|
else {
|
|
Write-Host -ForegroundColor "Green" "[X] Powershell Active Directory Module`n"
|
|
$preflightCounter++
|
|
}
|
|
Start-Sleep 1
|
|
if ( $preflightCounter -eq 2 ) {
|
|
Write-Host -ForegroundColor "Green" "Pre-Flight Checks are a go... Launching CHAMP"
|
|
Start-Sleep 1
|
|
$devFlag = 0
|
|
if ($devFlag -eq "0" ) {
|
|
$consolePTR = [Console.Window]::GetConsoleWindow()
|
|
[Console.Window]::ShowWindow($consolePTR, 0)
|
|
}
|
|
else {
|
|
$consolePTR = [Console.Window]::GetConsoleWindow()
|
|
[Console.Window]::ShowWindow($consolePTR, 3)
|
|
}
|
|
$Form1.Add_Shown({ $Form1.Activate(); $UNBox.Focus() })
|
|
$ModalResult = $Form1.ShowDialog()
|
|
}
|
|
else {
|
|
Write-Host -ForegroundColor "Red" "Missing Dependancies!`n"
|
|
Write-Host "---------- Dependancies Needed ----------`n"
|
|
Write-Host $preflightDependancies
|
|
if ( $preflightDependancies -like "*Active Directory Powershell Module*" ) {
|
|
[Windows.Forms.MessageBox]::Show("Please Install RSAT from the following Page", "Install Dependancy", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning) | Out-Null
|
|
Start-Process "https://www.microsoft.com/en-us/download/details.aspx?id=45520"
|
|
}
|
|
if ( $preflightDependancies -like "*Newer Version Available*" ) {
|
|
[Windows.Forms.MessageBox]::Show("Please download the newset version from the following page", "Install Dependancy", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning) | Out-Null
|
|
Start-Process "https://git.racooncity.org/brotoskyj/CHAMP/releases"
|
|
}
|
|
exit
|
|
}
|
|
}
|
|
#
|
|
# Theme Selector
|
|
#
|
|
$strawberryToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#5C374C"
|
|
$toolStrip1.BackColor = "#5C374C"
|
|
$toolStrip1.ForeColor = "#FF8C61"
|
|
$tabControl1.BackColor = "#5C374C"
|
|
$tabPage1.BackColor = "#5C374C"
|
|
$tabPage2.BackColor = "#5C374C"
|
|
$tabPage3.BackColor = "#5C374C"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#CE6A85" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#CE6A85" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#CE6A85" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#CE6A85" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#CE6A85" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF8C61" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$lightToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "Control"
|
|
$toolStrip1.BackColor = "Control"
|
|
$toolStrip1.ForeColor = "Black"
|
|
$tabControl1.BackColor = "Control"
|
|
$tabPage1.BackColor = "Control"
|
|
$tabPage2.BackColor = "Control"
|
|
$tabPage3.BackColor = "Control"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Control" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Control" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Control" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Control" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Control" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "Black" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$toolStripMenuItem2.Add_Click(
|
|
{
|
|
$Form1.BackColor = "Black"
|
|
$toolStrip1.BackColor = "Black"
|
|
$toolStrip1.ForeColor = "White"
|
|
$tabControl1.BackColor = "Black"
|
|
$tabPage1.BackColor = "Black"
|
|
$tabPage2.BackColor = "Black"
|
|
$tabPage3.BackColor = "Black"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "White" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "White" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "White" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "Black" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "White" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "White" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "White" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "White" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$draculaToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#44475A"
|
|
$toolStrip1.BackColor = "#44475A"
|
|
$toolStrip1.ForeColor = "#FF79C6"
|
|
$tabControl1.BackColor = "#44475A"
|
|
$tabPage1.BackColor = "#44475A"
|
|
$tabPage2.BackColor = "#44475A"
|
|
$tabPage3.BackColor = "#44475A"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF79C6" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$halloweenToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#3C096C"
|
|
$toolStrip1.BackColor = "#3C096C"
|
|
$toolStrip1.ForeColor = "#FF79C6"
|
|
$tabControl1.BackColor = "#3C096C"
|
|
$tabPage1.BackColor = "#3C096C"
|
|
$tabPage2.BackColor = "#3C096C"
|
|
$tabPage3.BackColor = "#3C096C"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#9D4EDD" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#9D4EDD" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#9D4EDD" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#9D4EDD" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#9D4EDD" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#FF7900" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$nordToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#3B4252"
|
|
$toolStrip1.BackColor = "#3B4252"
|
|
$toolStrip1.ForeColor = "#8FBCBB"
|
|
$tabControl1.BackColor = "#3B4252"
|
|
$tabPage1.BackColor = "#3B4252"
|
|
$tabPage2.BackColor = "#3B4252"
|
|
$tabPage3.BackColor = "#3B4252"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#5E81AC" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#8FBCBB" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$seawaveToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#40798C"
|
|
$toolStrip1.BackColor = "#40798C"
|
|
$toolStrip1.ForeColor = "#8FBCBB"
|
|
$tabControl1.BackColor = "#40798C"
|
|
$tabPage1.BackColor = "#40798C"
|
|
$tabPage2.BackColor = "#40798C"
|
|
$tabPage3.BackColor = "#40798C"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#70A9A1" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#70A9A1" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#70A9A1" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#70A9A1" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#70A9A1" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#CFE0C3" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$solarizedToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#073642"
|
|
$toolStrip1.BackColor = "#073642"
|
|
$toolStrip1.ForeColor = "#8FBCBB"
|
|
$tabControl1.BackColor = "#073642"
|
|
$tabPage1.BackColor = "#073642"
|
|
$tabPage2.BackColor = "#073642"
|
|
$tabPage3.BackColor = "#073642"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#2aa198" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#859900 " }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#2aa198" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#859900 " }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#2aa198" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#859900" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#2aa198" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#859900" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#2aa198" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#859900 " }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#859900" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#859900" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#859900" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#859900" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$vaporwaveToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#dd6dfb"
|
|
$toolStrip1.BackColor = "#dd6dfb"
|
|
$toolStrip1.ForeColor = "#05FFCF"
|
|
$tabControl1.BackColor = "#dd6dfb"
|
|
$tabPage1.BackColor = "#dd6dfb"
|
|
$tabPage2.BackColor = "#dd6dfb"
|
|
$tabPage3.BackColor = "#dd6dfb"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$seapunkToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#300350"
|
|
$toolStrip1.BackColor = "#300350"
|
|
$toolStrip1.ForeColor = "#05FFCF"
|
|
$tabControl1.BackColor = "#300350"
|
|
$tabPage1.BackColor = "#300350"
|
|
$tabPage2.BackColor = "#300350"
|
|
$tabPage3.BackColor = "#300350"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#F642D0" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#05FFCF" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
$sunsetToolStripMenuItem.Add_Click(
|
|
{
|
|
$Form1.BackColor = "#976393"
|
|
$toolStrip1.BackColor = "#976393"
|
|
$toolStrip1.ForeColor = "#feda84"
|
|
$tabControl1.BackColor = "#976393"
|
|
$tabPage1.BackColor = "#976393"
|
|
$tabPage2.BackColor = "#976393"
|
|
$tabPage3.BackColor = "#976393"
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#43497F" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#43497F" }
|
|
$tabPage1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$tabPage2.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#43497F" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox1.Controls | Where { $_.GetType().Name -eq "RadioButton" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#43497F" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$groupBox2.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.BackColor = "#43497F" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Button" } | ForEach { $_.ForeColor = "Black" }
|
|
$Form1.Controls | Where { $_.GetType().Name -eq "GroupBox" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$groupBox4.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$groupBox5.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$groupBox6.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$EmailBox.Controls | Where { $_.GetType().Name -eq "Label" } | ForEach { $_.ForeColor = "#feda84" }
|
|
$Form1.Refresh()
|
|
}
|
|
)
|
|
# Start User, Cherwell, and Knoledge base functions
|
|
$Search.Add_Click({
|
|
SelectUser
|
|
})
|
|
$UNBox.Add_KeyDown(
|
|
{
|
|
if ($_.KeyCode -eq "Return") {
|
|
$UNBox.AcceptButton = New-Object System.Windows.Forms.Button
|
|
$_.Handled
|
|
$_.SurpressKeySound = $true
|
|
SelectUser
|
|
}
|
|
}
|
|
)
|
|
Function SelectUser() {
|
|
if ( $radioButton1.Checked -eq "True" ) {
|
|
findUserName($UNBox)
|
|
}
|
|
elseif ( $radioButton2.Checked -eq "True" ) {
|
|
Write-Host "Searching UPN"
|
|
}
|
|
elseif ( $radioButton3.Checked -eq "True" ) {
|
|
userPopOut
|
|
}
|
|
else {
|
|
$mainSelectBox = New-Object System.Windows.Forms.Form
|
|
$mainSelectBox.Size = New-Object System.Drawing.Size(600, 500)
|
|
$mainSelectBox.StartPosition = "CenterScreen"
|
|
$mainSelectBox.TopMost = $true
|
|
$mainSelectBox.Text = "Select Users"
|
|
$mainSelectBox.Add_Shown({ $mainSelectBox.Activate() })
|
|
$mainSelectBox.ShowDialog()
|
|
}
|
|
}
|
|
Function findUserName () {
|
|
if ( $UNBox.Text -ne "" ) {
|
|
$ACDBox.Clear()
|
|
$AEBox.Clear()
|
|
$MyIDBox.Clear()
|
|
$DNBox.Clear()
|
|
$textBox6.Clear()
|
|
$EIDBox.Clear()
|
|
$JTBox.Clear()
|
|
$LBPBox.Clear()
|
|
$LLTBox.Clear()
|
|
$OUBox.Clear()
|
|
$MEBox.Clear()
|
|
$OCBox.Clear()
|
|
$PLSBox.Clear()
|
|
$PEBox.Clear()
|
|
$VPNBox.Clear()
|
|
$GMBox.Items.Clear()
|
|
$AEBox.BackColor = ""
|
|
$PEBox.BackColor = ""
|
|
$userSearch = $UNBox.Text
|
|
$userSearchSani = $userSearch.Trim()
|
|
$main.Refresh()
|
|
Try {
|
|
(Get-ADUser -Identity $userSearchSani -Server wvuhs.com)
|
|
$userFound = "True"
|
|
}
|
|
Catch {
|
|
$userFound = "False"
|
|
$EmailBox.Text = "Not Found"
|
|
}
|
|
if ( $userFound -eq "True" ) {
|
|
$user = Get-ADUser -Identity $userSearchSani -Server wvuhs.com -Properties *
|
|
$mainUserGroupMembershipsItems = $user.memberof -replace '^CN=([^,]+).+$', '$1' | Sort-Object
|
|
$GMBox.Items.AddRange($mainUserGroupMembershipsItems)
|
|
$ACDBox.Text = $user.Created
|
|
$AEBox.Text = $user.Enabled
|
|
if ( $user.Enabled -eq "True" ) {
|
|
$AEBox.Text = "True"
|
|
$AEBox.BackColor = "LightGreen"
|
|
}
|
|
else {
|
|
$AEBox.Text = "False"
|
|
$AEBox.BackColor = "Red"
|
|
}
|
|
$EmailBox.Text = $user.DisplayName
|
|
$MyIDBox.Text = $user.ExtensionAttribute3
|
|
$DNBox.Text = $user.DisplayName
|
|
$textBox6.Text = $user.Mail
|
|
$EIDBox.Text = $user.ExtensionAttribute13
|
|
$JTBox.Text = $user.Title
|
|
$LBPBox.Text = $user.LastBadPasswordAttempt
|
|
$LLTBox.Text = $user.LastLogonDate
|
|
$OUBox.Text = $user.CanonicalName
|
|
if ( "wvum-mam" -in $mainUserGroupMembershipsItems ) {
|
|
$MEBox.Text = "True"
|
|
}
|
|
else {
|
|
$MEBox.Text = "False"
|
|
}
|
|
if ( "WVUM-O365F1Office" -in $mainUserGroupMembershipsItems ) {
|
|
$MEBox.Text = "Web Client Only"
|
|
}
|
|
elseif ( "WVUM-O365E3Office" -in $mainUserGroupMembershipsItems ) {
|
|
$MEBox.Text = "Web Client and Full Client"
|
|
}
|
|
elseif ( "WVUM-O365E3Teams" -in $mainUserGroupMembershipsItems ) {
|
|
$OCBox.Text = "Web Client and Full Client"
|
|
}
|
|
elseif ( "WVUM-O365F1Teams" -in $mainUserGroupMembershipsItems ) {
|
|
$OCBox.Text = "Web Client Only"
|
|
}
|
|
elseif ( "WVUM-O365F3Office" -in $mainUserGroupMembershipsItems ) {
|
|
$OCBox.Text = "Web Client Only"
|
|
}
|
|
elseif ( "WVUM-O365F3Teams" -in $mainUserGroupMembershipsItems ) {
|
|
$OCBox.Text = "Web Client Only"
|
|
}
|
|
else {
|
|
$OCBox.Text = "Undefined"
|
|
}
|
|
$PLSBox.Text = $user.PasswordLastSet
|
|
$PEBox.Text = $user.PasswordExpired
|
|
if ( $user.PasswordExpired -eq "True" ) {
|
|
$PEBox.Text = $user.PasswordExpired
|
|
$PEBox.BackColor = "Red"
|
|
}
|
|
else {
|
|
$PEBox.Text = $user.PasswordExpired
|
|
$PEBox.BackColor = "LightGreen"
|
|
}
|
|
if ("ACS - VPN - WVUHS" -in $mainUserGroupMembershipsItems) {
|
|
$VPNBox.Text = "True"
|
|
}
|
|
else {
|
|
$VPNBox.Text = "False"
|
|
}
|
|
$main.Refresh()
|
|
}
|
|
}
|
|
}
|
|
function userPopout {
|
|
function Get-ScriptDirectory {
|
|
#Return the directory name of this script
|
|
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
|
|
Split-Path $Invocation.MyCommand.Path
|
|
}
|
|
$ScriptPath = Get-ScriptDirectory
|
|
# Loading external assemblies
|
|
Add-Type -AssemblyName System.Windows.Forms
|
|
Add-Type -AssemblyName System.Drawing
|
|
|
|
$Form2 = New-Object System.Windows.Forms.Form
|
|
|
|
$label1 = New-Object System.Windows.Forms.Label
|
|
$dataGridView1 = New-Object System.Windows.Forms.DataGridView
|
|
$displayName = New-Object System.Windows.Forms.DataGridViewTextBoxColumn
|
|
$userName = New-Object System.Windows.Forms.DataGridViewTextBoxColumn
|
|
$email = New-Object System.Windows.Forms.DataGridViewTextBoxColumn
|
|
$enterpriseID = New-Object System.Windows.Forms.DataGridViewTextBoxColumn
|
|
$jobTitle = New-Object System.Windows.Forms.DataGridViewTextBoxColumn
|
|
$userSelectBtn = New-Object System.Windows.Forms.Button
|
|
#
|
|
# label1
|
|
#
|
|
$label1.AutoSize = $true
|
|
$label1.Font = New-Object System.Drawing.Font("Microsoft Sans Serif", 14.25, [System.Drawing.FontStyle]::Regular, [System.Drawing.GraphicsUnit]::Point, 0)
|
|
$label1.Location = New-Object System.Drawing.Point(13, 13)
|
|
$label1.Name = "label1"
|
|
$label1.Size = New-Object System.Drawing.Size(111, 24)
|
|
$label1.TabIndex = 0
|
|
$label1.Text = "Select User:"
|
|
#
|
|
# dataGridView1
|
|
#
|
|
$dataGridView1.ColumnHeadersHeightSizeMode = [System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode]::AutoSize
|
|
$dataGridView1.Columns.Add($displayName)
|
|
$dataGridView1.Columns.Add($userName)
|
|
$dataGridView1.Columns.Add($email)
|
|
$dataGridView1.Columns.Add($enterpriseID)
|
|
$dataGridView1.Columns.Add($jobTitle)
|
|
$dataGridView1.Location = New-Object System.Drawing.Point(13, 41)
|
|
$dataGridView1.Name = "dataGridView1"
|
|
$dataGridView1.Size = New-Object System.Drawing.Size(1080, 321)
|
|
$dataGridView1.TabIndex = 1
|
|
$dataGridView1.SelectionMode = "FullRowSelect"
|
|
$dataGridView1.MultiSelect = $false
|
|
#
|
|
# displayName
|
|
#
|
|
$displayName.AutoSizeMode = [System.Windows.Forms.DataGridViewAutoSizeColumnMode]::Fill
|
|
$displayName.HeaderText = "Display Name"
|
|
$displayName.Name = "displayName"
|
|
#
|
|
# userName
|
|
#
|
|
$userName.AutoSizeMode = [System.Windows.Forms.DataGridViewAutoSizeColumnMode]::Fill
|
|
$userName.HeaderText = "User Name"
|
|
$userName.Name = "userName"
|
|
#
|
|
# email
|
|
#
|
|
$email.AutoSizeMode = [System.Windows.Forms.DataGridViewAutoSizeColumnMode]::Fill
|
|
$email.HeaderText = "Email"
|
|
$email.Name = "email"
|
|
#
|
|
# enterpriseID
|
|
#
|
|
$enterpriseID.AutoSizeMode = [System.Windows.Forms.DataGridViewAutoSizeColumnMode]::Fill
|
|
$enterpriseID.HeaderText = "Enterprise ID"
|
|
$enterpriseID.Name = "enterpriseID"
|
|
#
|
|
# jobTitle
|
|
#
|
|
$jobTitle.AutoSizeMode = [System.Windows.Forms.DataGridViewAutoSizeColumnMode]::Fill
|
|
$jobTitle.HeaderText = "Job Title"
|
|
$jobTitle.Name = "jobTitle"
|
|
#
|
|
# userSelectBtn
|
|
#
|
|
$userSelectBtn.Location = New-Object System.Drawing.Point(17, 369)
|
|
$userSelectBtn.Name = "userSelectBtn"
|
|
$userSelectBtn.Size = New-Object System.Drawing.Size(175, 28)
|
|
$userSelectBtn.TabIndex = 2
|
|
$userSelectBtn.Text = "Select"
|
|
$userSelectBtn.UseVisualStyleBackColor = $true
|
|
$userSelectBtn.Add_Click(
|
|
{
|
|
SELECTUSER
|
|
}
|
|
)
|
|
#
|
|
# Form1
|
|
#
|
|
$Form2.ClientSize = New-Object System.Drawing.Size(1105, 414)
|
|
$Form2.Controls.Add($userSelectBtn)
|
|
$Form2.Controls.Add($dataGridView1)
|
|
$Form2.Controls.Add($label1)
|
|
$Form2.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedDialog
|
|
$Form2.MaximizeBox = $false
|
|
$Form2.MinimizeBox = $false
|
|
$Form2.Name = "Form1"
|
|
$Form2.ShowIcon = $false
|
|
$Form2.Text = "User Search"
|
|
$Form2.TopMost = $true
|
|
$lastnameSearch = $UNBox.Text.Trim() + "*"
|
|
$users = Get-ADUser -Filter {
|
|
(
|
|
surName -like $lastnameSearch
|
|
)
|
|
} -Properties *
|
|
|
|
ForEach ( $user in $users ) {
|
|
$dataGridView1.Rows.Add($user.DisplayName, $user.SamAccountName, $user.Mail, $user.ExtensionAttribute13, $user.Title)
|
|
}
|
|
function SELECTUSER {
|
|
$UNBox.Text = $dataGridView1.SelectedCells[1].Value
|
|
$radioButton1.Checked = $true
|
|
$Form1.Refresh()
|
|
$Form2.Close()
|
|
findUserName($UNBox)
|
|
}
|
|
function OnFormClosing_Form1 {
|
|
($_).Cancel = $False
|
|
}
|
|
$Form2.Add_FormClosing( { OnFormClosing_Form1 } )
|
|
$Form2.Add_Shown({ $Form2.Activate() })
|
|
$ModalResult = $Form2.ShowDialog()
|
|
$Form2.Dispose()
|
|
}
|
|
$Clear.Add_Click(
|
|
{
|
|
$ACDBox.Clear()
|
|
$AEBox.Clear()
|
|
$MyIDBox.Clear()
|
|
$DNBox.Clear()
|
|
$textBox6.Clear()
|
|
$EIDBox.Clear()
|
|
$JTBox.Clear()
|
|
$LBPBox.Clear()
|
|
$LLTBox.Clear()
|
|
$OUBox.Clear()
|
|
$MEBox.Clear()
|
|
$EmailBox.Text = "Account Information"
|
|
$OCBox.Clear()
|
|
$PLSBox.Clear()
|
|
$PEBox.Clear()
|
|
$VPNBox.Clear()
|
|
$GMBox.Items.Clear()
|
|
$AEBox.BackColor = ""
|
|
$PEBox.BackColor = ""
|
|
$UNBox.Clear()
|
|
}
|
|
)
|
|
|
|
#Start Computer Functions
|
|
function CFE() {
|
|
$pcTag = $textbox1.Text
|
|
$pcTagSani = $pcTag.Trim()
|
|
if (( $null -eq $pcTagSani ) -or ($pcTagSani -eq "")) {
|
|
[Windows.Forms.MessageBox]::Show("Computer Tag Cannot Be Blank", "Empty Computer Tag", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning)
|
|
}
|
|
else {
|
|
$testConnection = [powershell]::Create().AddScript("Test-Path -Path \\$pcTagSani\C$; Test")
|
|
$handle = $testConnection.BeginInvoke()
|
|
$seconds = [int]$numericUpDown1.Text * 1000
|
|
if ( $AutoClearCheck.Checked ) {
|
|
$richTextBox1.Clear()
|
|
}
|
|
if ( -not $handle.AsyncWaitHandle.WaitOne($seconds)) {
|
|
$richTextBox1.Text = $richTextBox1.Text + "`n" + "---- $pcTagSani C$ ----`r`nProblem Connecting to Remote Machine`r`n`r`n"
|
|
$richTextBox1.SelectionStart = $richTextBox1.Text.Length
|
|
$richTextBox1.ScrollToCaret()
|
|
throw ''
|
|
}
|
|
else {
|
|
Invoke-Item "\\$pcTagSani\C$"
|
|
}
|
|
}
|
|
}
|
|
function CLU () {
|
|
$pcTag = $textBox1.Text
|
|
$pcTagSani = $pcTag.Trim()
|
|
if (( $null -eq $pcTagSani ) -or ($pcTagSani -eq "" )) {
|
|
[Windows.Forms.MessageBox]::Show("Computer Tag Cannot Be Blank", "Empty Computer Tag", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning)
|
|
}
|
|
else {
|
|
$testConnection = [powershell]::Create().AddScript("Test-Path -Path \\$pcTagSani\C$; Test")
|
|
$handle = $testConnection.BeginInvoke()
|
|
$seconds = [int]$numericUpDown1.Text * 1000
|
|
if ( $AutoClearCheck.Checked ) {
|
|
$richTextBox1.Clear()
|
|
}
|
|
if ( -not $handle.AsyncWaitHandle.WaitOne($seconds)) {
|
|
$richTextBox1.Text = $richTextBox1.Text + "`n" + "---- $pcTagSani Current Logged on User ----`r`nProblem Connecting to Remote Machine`r`n`r`n"
|
|
$richTextBox1.SelectionStart = $richTextBox1.Text.Length
|
|
$richTextBox1.ScrollToCaret()
|
|
throw ''
|
|
}
|
|
else {
|
|
$username = (Get-CimInstance -ComputerName $pcTagSani -ClassName Win32_ComputerSystem).Username
|
|
$richTextBox1.Text = $richTextBox1.Text + "`n" + "---- $pcTagSani Current Logged on User ----`r`n$username`r`n`r`n"
|
|
$richTextBox1.SelectionStart = $richTextBox1.Text.Length
|
|
$richTextBox1.ScrollToCaret()
|
|
}
|
|
}
|
|
}
|
|
function LAPS () {
|
|
$pcTag = $textBox1.Text
|
|
$pcTagSani = $pcTag.Trim()
|
|
if (( $null -eq $pcTagSani ) -or ($pcTagSani -eq "" )) {
|
|
[Windows.Forms.MessageBox]::Show("Computer Tag Cannot Be Blank", "Empty Computer Tag", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning)
|
|
}
|
|
else {
|
|
if ( $AutoClearCheck.Checked ) {
|
|
$richTextBox1.Clear()
|
|
}
|
|
$laps = Get-ADComputer -Identity $pcTagSani -Server wvuhs.com -Properties * | Select-Object -ExpandProperty ms-Mcs-AdmPwd
|
|
if (( $null -eq $laps ) -or ( $laps -eq "" )) {
|
|
$laps = Get-ADComputer -Identity $pcTagSani -Server $domain -Properties * | Select-Object -ExpandProperty ms-Mcs-AdmPwd
|
|
$richTextBox1.Text = $richTextBox1.Text + "`n" + "---- $pcTagSani LAPS Password ----`r`nNo Password Found`r`n`r`n"
|
|
$richTextBox1.SelectionStart = $richTextBox1.Text.Length
|
|
$richTextBox1.ScrollToCaret()
|
|
}
|
|
else {
|
|
$richTextBox1.Text = $richTextBox1.Text + "`n" + "---- $pcTagSani LAPS Password ----`r`n$laps`r`n`r`n"
|
|
$richTextBox1.SelectionStart = $richTextBox1.Text.Length
|
|
$richTextBox1.ScrollToCaret()
|
|
}
|
|
}
|
|
}
|
|
Function REMOTE () {
|
|
$pcTag = $textBox1.Text
|
|
$pcTagSani = $pcTag.Trim()
|
|
if (( $null -eq $pcTagSani ) -or ($pcTagSani -eq "")) {
|
|
[Windows.Forms.MessageBox]::Show("Computer Tag Cannot Be Blank", "Empty Computer Tag", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning)
|
|
}
|
|
else {
|
|
$testConnection = Test-Connection -Count 1 $pcTagSani
|
|
if ( $testConnection -eq "False" ) {
|
|
$richTextBox1.Text = $richTextBox1.Text + "`n" + "---- $pcTagSani SCCM ----`r`nProblem Connecting to Remote Machine`r`n`r`n"
|
|
$richTextBox1.SelectionStart = $richTextBox1.Text.Length
|
|
$richTextBox1.ScrollToCaret()
|
|
}
|
|
else {
|
|
$path1 = Test-Path "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386"
|
|
$path2 = Test-Path "C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386"
|
|
$path3 = Test-Path "C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\i386"
|
|
$path4 = Test-Path "C:\Program Files\Microsoft Configuration Manager\bin\i386"
|
|
if ( $path1 -Match "True" ) {
|
|
& 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\CmRcViewer.exe' $pcTagSani
|
|
Start-Sleep -s $numericUpDown1.Text
|
|
}
|
|
elseif ( $path2 -Match "True" ) {
|
|
& 'C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\CmRcViewer.exe' $pcTagSani
|
|
Start-Sleep -s $numericUpDown1.Text
|
|
}
|
|
elseif ( $path3 -Match "True" ) {
|
|
& 'C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\i386\CmRcViewer.exe' $pcTagSani
|
|
Start-Sleep -s $numericUpDown1.Text
|
|
}
|
|
elseif ( $path4 -Match "True" ) {
|
|
& 'C:\Program Files\Microsoft Configuration Manager\bin\i386\CmRcViewer.exe' $pcTagSani
|
|
Start-Sleep -s $numericUpDown1.Text
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Function REBOOTREMOTE () {
|
|
$pcTag = $textBox1.Text
|
|
$pcTagSani = $pcTag.Trim()
|
|
$testConnection = Test-Connection $pcTagSani -Count 1 -Quiet
|
|
if (( $null -eq $pcTagSani ) -or ($pcTagSani -eq "")) {
|
|
[Windows.Forms.MessageBox]::Show("Computer Tag Cannot Be Blank", "Empty Computer Tag", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Warning)
|
|
}
|
|
else {
|
|
$rebootConfirmation = [Windows.Forms.MessageBox]::Show("Are you sure you want to reboot $pcTagSani`?", "Confirm", [Windows.Forms.MessageBoxButtons]::YesNo, [Windows.Forms.MessageBoxIcon]::Question)
|
|
if ( $rebootConfirmation -eq "Yes" ) {
|
|
[Windows.Forms.MessageBox]::Show("Rebooting $pcTagSani", "Restarting", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
|
|
Restart-Computer -ComputerName $pcTagSani -Force
|
|
Start-Sleep -Seconds 5
|
|
Do {
|
|
$testConnection
|
|
Start-Sleep -Seconds 5
|
|
} Until ( $testConnection -eq "False" )
|
|
[Windows.Forms.MessageBox]::Show("Successfully shutdown, waiting on restart.", "Restarting Machine", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
|
|
Start-Sleep -Seconds 5
|
|
Do {
|
|
$testConnection
|
|
Start-Sleep -Seconds 5
|
|
} Until ($testConnection -eq "True")
|
|
$remoteMessage = [Windows.Forms.MessageBox]::Show("Would you like to Remote into $pcTagSani`?", "Host Rebooted", [Windows.Forms.MessageBoxButtons]::YesNo, [Windows.Forms.MessageBoxIcon]::Question)
|
|
if ( $remoteMessage -eq 'Yes' ) {
|
|
REMOTE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function geoLocationForm() {
|
|
$geoLocationFormBox = New-Object System.Windows.Forms.Form
|
|
$geoLocationFormBox.Text = "Geo-Location API"
|
|
$geoLocationFormBox.Height = 300
|
|
$geoLocationFormBox.Width = 500
|
|
$ipSearchBox = New-Object System.Windows.Forms.TextBox
|
|
$ipSearchBox.Size = New-Object System.Drawing.Size(165, 35)
|
|
$ipSearchBox.Location = New-Object System.Drawing.Point(10, 45)
|
|
$ipSearchLabel = New-Object System.Windows.Forms.Label
|
|
$ipSearchLabel.Text = "IP Address: "
|
|
$ipSearchLabel.Location = New-Object System.Drawing.Size(10,20)
|
|
$ispTextBox = New-Object System.Windows.Forms.TextBox
|
|
$ispTextBox.Size = New-Object System.Drawing.Size(165, 35)
|
|
$ispTextBox.Location = New-Object System.Drawing.Point(275,20)
|
|
$ispTextLabel = New-Object System.Windows.Forms.Label
|
|
$ispTextLabel.Text = "ISP:"
|
|
$ispTextLabel.Location = New-Object System.Drawing.Point(225, 20)
|
|
$countryTextBox = New-Object System.Windows.Forms.TextBox
|
|
$countryTextBox.Size = New-Object System.Drawing.Point(165, 35)
|
|
$countryTextBox.Location = New-Object System.Drawing.Point(275, 60)
|
|
$countryTextLabel = New-Object System.Windows.Forms.Label
|
|
$countryTextLabel.Text = "Country: "
|
|
$countryTextLabel.Location = New-Object System.Drawing.Point(225, 60)
|
|
$stateTextBox = New-Object System.Windows.Forms.TextBox
|
|
$stateTextBox.Size = New-Object System.Drawing.Size(165, 35)
|
|
$stateTextBox.Location = New-Object System.Drawing.Point(275,100)
|
|
$stateTextLabel = New-Object System.Windows.Forms.Label
|
|
$stateTextLabel.Text = "State:"
|
|
$stateTextLabel.Location = New-Object System.Drawing.Point(225, 100)
|
|
$cityTextBox = New-Object System.Windows.Forms.TextBox
|
|
$cityTextBox.Size = New-Object System.Drawing.Size(165, 35)
|
|
$cityTextBox.Location = New-Object System.Drawing.Point(275,140)
|
|
$cityTextLabel = New-Object System.Windows.Forms.Label
|
|
$cityTextLabel.Text = "City:"
|
|
$cityTextLabel.Location = New-Object System.Drawing.Point(225, 140)
|
|
$ipLocationSearchButton = New-Object System.Windows.Forms.Button
|
|
$ipLocationSearchButton.Size = New-Object System.Drawing.Size(50, 23)
|
|
$ipLocationSearchButton.Location = New-Object System.Drawing.Size(10, 75)
|
|
$ispTextBox.Clear()
|
|
$countryTextBox.Clear()
|
|
$ipSearchBox.Clear()
|
|
$ipLocationSearchButton.Text = "Search"
|
|
$ipLocationSearchButton.Add_Click(
|
|
{
|
|
searchIP
|
|
}
|
|
)
|
|
$geoLocationFormBox.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedDialog
|
|
$geoLocationFormBox.Controls.AddRange(
|
|
@(
|
|
$ipSearchBox,
|
|
$ipSearchLabel
|
|
$ispTextBox,
|
|
$ispTextLabel,
|
|
$countryTextBox,
|
|
$countryTextLabel,
|
|
$stateTextBox,
|
|
$stateTextLabel,
|
|
$cityTextBox,
|
|
$cityTextLabel
|
|
$ipLocationSearchButton
|
|
)
|
|
)
|
|
function searchIP() {
|
|
$ispTextBox.Clear()
|
|
$countryTextBox.Clear()
|
|
$ipToSearch = $ipSearchBox.Text
|
|
$response = Invoke-RestMethod -Method GET -URI "http://ip-api.com/json/$ipToSearch"
|
|
$ispTextBox.Text = $response.isp
|
|
$countryTextBox.Text = $response.country
|
|
$stateTextBox.Text = $response.regionName
|
|
$cityTextBox.Text = $response.city
|
|
|
|
}
|
|
$geoLocationFormBox.ShowDialog()
|
|
|
|
}
|
|
function OnFormClosing_Form1 {
|
|
(($_).CloseReason -eq [System.Windows.Forms.CloseReason]::UserClosing)
|
|
}
|
|
$Form1.Add_FormClosing( { OnFormClosing_Form1 } )
|
|
preflight
|
|
$Reader.Close()
|
|
$Form1.Dispose() |