Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Generated Form Function
- function GenerateForm {
- Import-Module ActiveDirectory
- #login
- $credential = Get-Credential
- ########################################################################
- # Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
- # Generated On: 10/5/2012 12:11 PM
- # Generated By: rbevans
- ########################################################################
- #region Import the Assemblies
- [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
- [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
- #endregion
- #region Generated Form Objects
- $PCRename = New-Object System.Windows.Forms.Form
- $CompInfoTab = New-Object System.Windows.Forms.TabControl
- $StatusVersion = New-Object System.Windows.Forms.StatusBar
- $tabPage1 = New-Object System.Windows.Forms.TabPage
- $ViewCDriveBTN = New-Object System.Windows.Forms.Button
- $RDPBTN = New-Object System.Windows.Forms.Button
- $FindCompWarning = New-Object System.Windows.Forms.Label
- $ReportsGRP = New-Object System.Windows.Forms.GroupBox
- $RptWarning = New-Object System.Windows.Forms.Label
- $SoftwareBTN = New-Object System.Windows.Forms.Button
- $hotfix_reportBTN = New-Object System.Windows.Forms.Button
- $ExportcheckBox = New-Object System.Windows.Forms.CheckBox
- $FindCompBTN = New-Object System.Windows.Forms.Button
- $ComputerName = New-Object System.Windows.Forms.Label
- $CompNameTextBOX = New-Object System.Windows.Forms.TextBox
- $CompInfoGRP = New-Object System.Windows.Forms.GroupBox
- $SDIInfo = New-Object System.Windows.Forms.TextBox
- $LoginInfo = New-Object System.Windows.Forms.TextBox
- $IPInfo = New-Object System.Windows.Forms.TextBox
- $ImageLab = New-Object System.Windows.Forms.Label
- $QueryHelpLabel = New-Object System.Windows.Forms.Label
- $LoginLabel = New-Object System.Windows.Forms.Label
- $IPLabel = New-Object System.Windows.Forms.Label
- $tabPage2 = New-Object System.Windows.Forms.TabPage
- $QueryADBox = New-Object System.Windows.Forms.TextBox
- $QueryLabel = New-Object System.Windows.Forms.Label
- $QueryADBTN = New-Object System.Windows.Forms.Button
- $WarningLabel = New-Object System.Windows.Forms.Label
- $RenameCompBTN = New-Object System.Windows.Forms.Button
- $NewCompBox = New-Object System.Windows.Forms.TextBox
- $CUCompNameBox = New-Object System.Windows.Forms.TextBox
- $NewCompName = New-Object System.Windows.Forms.Label
- $OldCompName = New-Object System.Windows.Forms.Label
- $tabPage3 = New-Object System.Windows.Forms.TabPage
- $aboutbox = New-Object System.Windows.Forms.GroupBox
- $AboutLabel = New-Object System.Windows.Forms.TextBox
- $CUSGetInfoBTN = New-Object System.Windows.Forms.Button
- $CUSSoftwareBTN = New-Object System.Windows.Forms.Button
- $CUSModelOut = New-Object System.Windows.Forms.TextBox
- $CUSCompModel = New-Object System.Windows.Forms.Label
- $CUSSDIOut = New-Object System.Windows.Forms.TextBox
- $CUSSerialOut = New-Object System.Windows.Forms.TextBox
- $CUSNameout = New-Object System.Windows.Forms.TextBox
- $CUSIPOut = New-Object System.Windows.Forms.TextBox
- $CUSCompNameOut = New-Object System.Windows.Forms.TextBox
- $CUSSDILabel = New-Object System.Windows.Forms.Label
- $CUSCompSsLabel = New-Object System.Windows.Forms.Label
- $CUSCompIpLabel = New-Object System.Windows.Forms.Label
- $CUSCompNameLabel = New-Object System.Windows.Forms.Label
- $InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
- #endregion Generated Form Objects
- #----------------------------------------------
- #Generated Event Script Blocks
- #----------------------------------------------
- #Provide Custom Code for events specified in PrimalForms.
- $handler_label3_Click=
- {
- #TODO: Place custom script here
- }
- $ViewCDriveBTN_OnClick=
- {
- explorer \\$current\C$
- }
- $QueryADBTN_OnClick=
- {
- $a="$QueryADBox"
- $ADQ = $a.TrimStart("System.Windows.Forms.TextBox, Text:")
- $out="$ADQ*"
- write-host "query the ad - $out and $a"
- Get-ADComputer -Filter 'SamAccountName -like $out' | Export-Csv $env:userprofile\desktop\dsquery.csv
- ##Get-ADComputer -Filter 'SamAccountName -like $out' | ogv
- #Prompt that export to text file complete.
- [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
- [Windows.Forms.MessageBox]::Show(“Query complete. See dsquery.csv saved to Desktop.”, “pcRenamifier v3.1”, [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
- }
- $hotfix_reportBTN_OnClick=
- {
- if($ExportcheckBox.Checked -eq $True)
- {
- Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName $current -Authentication 6 -credential $credential | select description,hotfixid,installedon | Sort InstallDate -Descending | Export-Csv $env:userprofile\desktop\$current-Hotfixes.csv
- [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
- [Windows.Forms.MessageBox]::Show(“Hotfix/Updates report exported to Excel on desktop.”, “pcRenamifier v3.1”, [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
- }
- Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName $current -Authentication 6 -credential $credential | select description,hotfixid,installedon | Sort InstallDate -Descending | ogv
- }
- $handler_form1_Load=
- {
- #TODO: Place custom script here
- }
- $handler_label4_Click=
- {
- #TODO: Place custom script here
- }
- $RenameCompBTN_OnClick=
- {
- ##Get Comp Old and New names
- $a="$CUCompNameBox"
- $current = $a.TrimStart("System.Windows.Forms.TextBox, Text:")
- Write-Host "$current"
- try
- {
- $findpc = Get-ADComputer $Current -properties CN
- } #end try
- catch [system.Exception]
- {
- write-warning "<< $old computer not found in AD. Please try again. >>"
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("$current not found in Active Directory." , "Try Again", "0", "Warning")
- } #end catch
- $b="$NewCompBox"
- $new = $b.TrimStart("System.Windows.Forms.TextBox, Text:")
- Write-Host "$current"
- try
- {
- $findnpc = Get-ADComputer $new -properties CN #searching for duplicates
- if($findpc -ne $null)
- {
- write-warning "<< $new - Duplicates in Active Directory. Please try again. >>"
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("$new - Duplicates not allowed in Active Directory. Please try again." , "Try Again", "0", "Warning")
- }
- } #end try
- catch [system.Exception] #error catching
- {
- write-host "<< $new is a valid name. >>"
- #computer rename process & prompt
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- $rename = [System.Windows.Forms.MessageBox]::Show("$CURRENT will be renamed to $new. Is this correct?" , "Confirm", "1", "Information")
- } #end catch
- Finally
- {
- if ($rename -eq "OK")
- {
- try
- {
- #Computer rename
- $remotemachine = Get-WmiObject Win32_ComputerSystem -ComputerName $current -Authentication 6 -credential $credential
- $remotemachine.Rename($new,$credential.GetNetworkCredential().Password,$credential.Username)
- }
- catch [System.UnauthorizedAccessException]
- {
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("Invalid A.ACCOUNT login. Please try again. " , "Login", "0", "Warning")
- $credential = Get-Credential
- }
- try
- {
- $errorActionPreference = 'Stop'
- restart-computer $current -credential $credential
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("$current has been renamed to $new and is rebooting. Have a nice day." , "Reboot", "0", "Information")
- }
- catch [Exception]
- {
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("There is currently a user logged on this computer and the computer will not be rebooted. Please reboot manually." , "Reboot", "0", "Warning")
- }
- } #end if rename OK
- elseif ($rename -eq "Cancel")
- {
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("Computer renamed cancelled." , "Cancel", "0", "Warning")
- } #end else if
- }
- }
- $CUSGetInfoBTN_OnClick=
- {
- #Get Computer name
- $CUSCompNameOut.Text = gc env:computername
- #get ip address
- $CUSIpOut.Text = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE | Select -ExpandProperty IPAddress
- #get computer image
- $CUSSDIOut.Text= get-wmiObject -Class Win32_OperatingSystem |Select -ExpandProperty Description
- #get computer model
- $CUSmodelOut.text = get-wmiobject -Class Win32_ComputerSystem | Select -ExpandProperty model
- #get computer serial number
- $CUSSerialOut.Text = Get-WmiObject Win32_bios | Select -ExpandProperty Serialnumber
- if ($CUSCompName -ne "Current Name")
- {
- $CUSSoftwareBTN.Enabled = $true
- }
- }
- $CUSSoftwareBTN_OnClick=
- {
- gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |Select DisplayName, DisplayVersion, Publisher, InstallDate, HelpLink, UninstallString |ogv
- }
- $FindCompBTN_OnClick=
- {
- $a="$CompNameTextBox"
- $current = $a.TrimStart("System.Windows.Forms.TextBox, Text:")
- Write-Host "$current"
- try
- {
- ##Get IP Address
- $IPInfo.Text = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $current -Authentication 6 -credential $credential -filter "IpEnabled = TRUE" | Select -ExpandProperty IPAddress
- Write-host "$IP"
- ##Get last login
- $c = get-wmiObject -Class Win32_UserProfile -ComputerName $current -Authentication 6 -credential $credential | Sort-Object -Property LastUseTime -Descending | Select-Object -First 1 -expandproperty LocalPath
- $LoginInfo.Text = $c.TrimStart("C:\Windows\ServiceProfiles\")
- write-host "$c"
- ##Get Image
- $SDIInfo.Text = get-wmiObject -Class Win32_OperatingSystem -ComputerName $current -Authentication 6 -credential $credential |Select -ExpandProperty Description
- }
- catch [system.Exception]
- {
- [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
- [System.Windows.Forms.MessageBox]::Show("Computer Name not valid or computer is turned off." , "$current", "0", "Warning")
- }
- #enables reports buttons
- if ($IPinfo -ne $null)
- {
- $SoftwareBTN.Enabled = $true
- $hotfix_reportBTN.Enabled = $true
- $ViewCDriveBTN.Enabled = $true
- }
- }
- $handler_label1_Click=
- {
- #TODO: Place custom script here
- }
- $SoftwareBTN_OnClick=
- {
- if($ExportcheckBox.Checked -eq $True)
- {
- #export to csv file on desktop
- Get-WmiObject -class win32_product -ComputerName $current -Authentication 6 -credential $credential | Select Name,Version,PackageName,Installdate,Vendor | Sort InstallDate -Descending| Export-Csv $env:userprofile\desktop\$current-$Fdate-Software.csv
- [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
- [Windows.Forms.MessageBox]::Show(“Software report exported to Excel on desktop.”, “pcRenamifier v3.1”, [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
- }
- Get-WmiObject -class win32_product -ComputerName $current -Authentication 6 -credential $credential | Select Name,Version,PackageName,Installdate,Vendor | Sort InstallDate -Descending| ogv
- }
- $handler_IPLabel_Click=
- {
- #TODO: Place custom script here
- }
- $RDPBTN_OnClick=
- {
- MSTSC.exe /v:$current
- }
- $OnLoadForm_StateCorrection=
- {#Correct the initial state of the form to prevent the .Net maximized form issue
- $PCRename.WindowState = $InitialFormWindowState
- $update=Test-Path "\\Insert\path\here" #\\example\update.zip
- if($update -eq "True")
- {
- $StatusVersion.Text = "New Update Available - 3.1!"
- }
- }
- #----------------------------------------------
- #region Generated Form Code
- $PCRename.AutoScaleMode = 0
- $PCRename.BackColor = [System.Drawing.Color]::FromArgb(255,240,240,240)
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 412
- $System_Drawing_Size.Width = 584
- $PCRename.ClientSize = $System_Drawing_Size
- $PCRename.DataBindings.DefaultDataSourceUpdateMode = 0
- $PCRename.HelpButton = $True
- $PCRename.MaximizeBox = $False
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 450
- $System_Drawing_Size.Width = 600
- $PCRename.MaximumSize = $System_Drawing_Size
- $PCRename.Name = "PCRename"
- $PCRename.SizeGripStyle = 2
- $PCRename.Text = "PCRenamifier v3.1"
- $PCRename.add_Load($handler_form1_Load)
- $StatusVersion.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 0
- $System_Drawing_Point.Y = 390
- $StatusVersion.Location = $System_Drawing_Point
- $StatusVersion.Name = "StatusVersion"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 22
- $System_Drawing_Size.Width = 584
- $StatusVersion.Size = $System_Drawing_Size
- $StatusVersion.TabIndex = 9
- $StatusVersion.Text = "Version: Current"
- $PCRename.Controls.Add($StatusVersion)
- $CompInfoTab.DataBindings.DefaultDataSourceUpdateMode = 0
- $CompInfoTab.HotTrack = $True
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 12
- $System_Drawing_Point.Y = 33
- $CompInfoTab.Location = $System_Drawing_Point
- $CompInfoTab.Name = "CompInfoTab"
- $CompInfoTab.SelectedIndex = 0
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 351
- $System_Drawing_Size.Width = 560
- $CompInfoTab.Size = $System_Drawing_Size
- $CompInfoTab.TabIndex = 8
- $PCRename.Controls.Add($CompInfoTab)
- $tabPage1.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 4
- $System_Drawing_Point.Y = 22
- $tabPage1.Location = $System_Drawing_Point
- $tabPage1.Name = "tabPage1"
- $System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
- $System_Windows_Forms_Padding.All = 3
- $System_Windows_Forms_Padding.Bottom = 3
- $System_Windows_Forms_Padding.Left = 3
- $System_Windows_Forms_Padding.Right = 3
- $System_Windows_Forms_Padding.Top = 3
- $tabPage1.Padding = $System_Windows_Forms_Padding
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 325
- $System_Drawing_Size.Width = 552
- $tabPage1.Size = $System_Drawing_Size
- $tabPage1.TabIndex = 0
- $tabPage1.Text = "Tech Tools"
- $tabPage1.UseVisualStyleBackColor = $True
- $CompInfoTab.Controls.Add($tabPage1)
- $ViewCDriveBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $ViewCDriveBTN.Enabled = $False
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 42
- $System_Drawing_Point.Y = 123
- $ViewCDriveBTN.Location = $System_Drawing_Point
- $ViewCDriveBTN.Name = "ViewCDriveBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 24
- $System_Drawing_Size.Width = 110
- $ViewCDriveBTN.Size = $System_Drawing_Size
- $ViewCDriveBTN.TabIndex = 10
- $ViewCDriveBTN.Text = "View C Drive"
- $ViewCDriveBTN.UseVisualStyleBackColor = $True
- $ViewCDriveBTN.add_Click($ViewCDriveBTN_OnClick)
- $tabPage1.Controls.Add($ViewCDriveBTN)
- $RDPBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 42
- $System_Drawing_Point.Y = 93
- $RDPBTN.Location = $System_Drawing_Point
- $RDPBTN.Name = "RDPBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 24
- $System_Drawing_Size.Width = 110
- $RDPBTN.Size = $System_Drawing_Size
- $RDPBTN.TabIndex = 6
- $RDPBTN.Text = "Remote Desktop"
- $RDPBTN.UseVisualStyleBackColor = $True
- $RDPBTN.add_Click($RDPBTN_OnClick)
- $tabPage1.Controls.Add($RDPBTN)
- $ReportsGRP.DataBindings.DefaultDataSourceUpdateMode = 0
- $ReportsGRP.Font = New-Object System.Drawing.Font("Microsoft Sans Serif",8.25,0,3,0)
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 26
- $System_Drawing_Point.Y = 174
- $ReportsGRP.Location = $System_Drawing_Point
- $ReportsGRP.Name = "ReportsGRP"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 91
- $System_Drawing_Size.Width = 270
- $ReportsGRP.Size = $System_Drawing_Size
- $ReportsGRP.TabIndex = 9
- $ReportsGRP.TabStop = $False
- $ReportsGRP.Text = "Reports"
- $tabPage1.Controls.Add($ReportsGRP)
- $SoftwareBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $SoftwareBTN.Enabled = $False
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 7
- $System_Drawing_Point.Y = 20
- $SoftwareBTN.Location = $System_Drawing_Point
- $SoftwareBTN.Name = "SoftwareBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 133
- $SoftwareBTN.Size = $System_Drawing_Size
- $SoftwareBTN.TabIndex = 7
- $SoftwareBTN.Text = "Software Report"
- $SoftwareBTN.UseVisualStyleBackColor = $True
- $SoftwareBTN.add_Click($SoftwareBTN_OnClick)
- $ReportsGRP.Controls.Add($SoftwareBTN)
- $hotfix_reportBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $hotfix_reportBTN.Enabled = $False
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 6
- $System_Drawing_Point.Y = 48
- $hotfix_reportBTN.Location = $System_Drawing_Point
- $hotfix_reportBTN.Name = "hotfix_reportBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 134
- $hotfix_reportBTN.Size = $System_Drawing_Size
- $hotfix_reportBTN.TabIndex = 1
- $hotfix_reportBTN.Text = "Hotfix/Updates Report"
- $hotfix_reportBTN.UseVisualStyleBackColor = $True
- $hotfix_reportBTN.add_Click($hotfix_reportBTN_OnClick)
- $ReportsGRP.Controls.Add($hotfix_reportBTN)
- $ExportcheckBox.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 160
- $System_Drawing_Point.Y = 47
- $ExportcheckBox.Location = $System_Drawing_Point
- $ExportcheckBox.Name = "ExportcheckBox"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 24
- $System_Drawing_Size.Width = 104
- $ExportcheckBox.Size = $System_Drawing_Size
- $ExportcheckBox.TabIndex = 6
- $ExportcheckBox.Text = "Export to Excel"
- $ExportcheckBox.UseVisualStyleBackColor = $True
- $ReportsGRP.Controls.Add($ExportcheckBox)
- $FindCompBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 186
- $System_Drawing_Point.Y = 54
- $FindCompBTN.Location = $System_Drawing_Point
- $FindCompBTN.Name = "FindCompBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 110
- $FindCompBTN.Size = $System_Drawing_Size
- $FindCompBTN.TabIndex = 7
- $FindCompBTN.Text = "Find Computer"
- $FindCompBTN.UseVisualStyleBackColor = $True
- $FindCompBTN.add_Click($FindCompBTN_OnClick)
- $tabPage1.Controls.Add($FindCompBTN)
- $ComputerName.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 20
- $System_Drawing_Point.Y = 31
- $ComputerName.Location = $System_Drawing_Point
- $ComputerName.Name = "ComputerName"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 109
- $ComputerName.Size = $System_Drawing_Size
- $ComputerName.TabIndex = 3
- $ComputerName.Text = "Computer Name:"
- $ComputerName.add_Click($handler_label1_Click)
- $tabPage1.Controls.Add($ComputerName)
- $CompNameTextBOX.DataBindings.DefaultDataSourceUpdateMode = 0
- $CompNameTextBOX.AcceptsReturn = $True
- $CompNameTextBOX.Font = New-Object System.Drawing.Font("Microsoft Sans Serif",8.25,2,3,0)
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 42
- $System_Drawing_Point.Y = 57
- $CompNameTextBOX.Location = $System_Drawing_Point
- $CompNameTextBOX.Name = "CompNameTextBOX"
- $CompNameTextBox.MaxLength = 15
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 134
- $CompNameTextBOX.Size = $System_Drawing_Size
- $CompNameTextBOX.TabIndex = 2
- $tabPage1.Controls.Add($CompNameTextBOX)
- $CompInfoGRP.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 342
- $System_Drawing_Point.Y = 24
- $CompInfoGRP.Location = $System_Drawing_Point
- $CompInfoGRP.Name = "CompInfoGRP"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 241
- $System_Drawing_Size.Width = 191
- $CompInfoGRP.Size = $System_Drawing_Size
- $CompInfoGRP.TabIndex = 5
- $CompInfoGRP.TabStop = $False
- $CompInfoGRP.Text = "Computer Information"
- $tabPage1.Controls.Add($CompInfoGRP)
- $SDIInfo.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 30
- $System_Drawing_Point.Y = 160
- $SDIInfo.Location = $System_Drawing_Point
- $SDIInfo.Name = "SDIInfo"
- $SDIInfo.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 13
- $System_Drawing_Size.Width = 145
- $SDIInfo.Size = $System_Drawing_Size
- $SDIInfo.TabIndex = 7
- $SDIInfo.Text = "SDI XX.XX"
- $CompInfoGRP.Controls.Add($SDIInfo)
- $LoginInfo.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 30
- $System_Drawing_Point.Y = 105
- $LoginInfo.Location = $System_Drawing_Point
- $LoginInfo.Name = "LoginInfo"
- $LoginInfo.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 13
- $System_Drawing_Size.Width = 145
- $LoginInfo.Size = $System_Drawing_Size
- $LoginInfo.TabIndex = 6
- $LoginInfo.Text = "UserName"
- $CompInfoGRP.Controls.Add($LoginInfo)
- $tabPage1.Controls.Add($CompInfoGRP)
- $IPInfo.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 30
- $System_Drawing_Point.Y = 44
- $IPInfo.Location = $System_Drawing_Point
- $IPInfo.Multiline = $True
- $IPInfo.Name = "IPInfo"
- $IPInfo.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 35
- $System_Drawing_Size.Width = 145
- $IPInfo.Size = $System_Drawing_Size
- $IPInfo.TabIndex = 8
- $IPInfo.Text = "192.1.1.1"
- $CompInfoGRP.Controls.Add($IPInfo)
- $ImageLab.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 7
- $System_Drawing_Point.Y = 134
- $ImageLab.Location = $System_Drawing_Point
- $ImageLab.Name = "ImageLab"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 100
- $ImageLab.Size = $System_Drawing_Size
- $ImageLab.TabIndex = 2
- $ImageLab.Text = "SDI Image:"
- $ImageLab.add_Click($handler_label4_Click)
- $CompInfoGRP.Controls.Add($ImageLab)
- $LoginLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 7
- $System_Drawing_Point.Y = 82
- $LoginLabel.Location = $System_Drawing_Point
- $LoginLabel.Name = "LoginLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 100
- $LoginLabel.Size = $System_Drawing_Size
- $LoginLabel.TabIndex = 1
- $LoginLabel.Text = "Last Login:"
- $LoginLabel.add_Click($handler_label3_Click)
- $CompInfoGRP.Controls.Add($LoginLabel)
- $IPLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 7
- $System_Drawing_Point.Y = 30
- $IPLabel.Location = $System_Drawing_Point
- $IPLabel.Name = "IPLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 80
- $IPLabel.Size = $System_Drawing_Size
- $IPLabel.TabIndex = 0
- $IPLabel.Text = "IP:"
- $IPLabel.add_Click($handler_IPLabel_Click)
- $CompInfoGRP.Controls.Add($IPLabel)
- $tabPage2.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 4
- $System_Drawing_Point.Y = 22
- $tabPage2.Location = $System_Drawing_Point
- $tabPage2.Name = "tabPage2"
- $System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
- $System_Windows_Forms_Padding.All = 3
- $System_Windows_Forms_Padding.Bottom = 3
- $System_Windows_Forms_Padding.Left = 3
- $System_Windows_Forms_Padding.Right = 3
- $System_Windows_Forms_Padding.Top = 3
- $tabPage2.Padding = $System_Windows_Forms_Padding
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 325
- $System_Drawing_Size.Width = 552
- $tabPage2.Size = $System_Drawing_Size
- $tabPage2.TabIndex = 1
- $tabPage2.Text = "Remote PC Rename"
- $tabPage2.UseVisualStyleBackColor = $True
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 327
- $System_Drawing_Point.Y = 77
- $QueryHelpLabel.Location = $System_Drawing_Point
- $QueryHelpLabel.Name = "QueryHelpLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 47
- $System_Drawing_Size.Width = 157
- $QueryHelpLabel.Size = $System_Drawing_Size
- $QueryHelpLabel.TabIndex = 9
- $QueryHelpLabel.Text = "Enter full computer name or just first five of comptuer name"
- $QueryHelpLabel.add_Click($handler_QueryHelpLabel_Click)
- $tabPage2.Controls.Add($QueryHelpLabel)
- $CompInfoTab.Controls.Add($tabPage2)
- $QueryADBox.DataBindings.DefaultDataSourceUpdateMode = 0
- $QueryADBox.AcceptsReturn = $True
- $QueryADBox.Font = New-Object System.Drawing.Font("Microsoft Sans Serif",8.25,2,3,0)
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 327
- $System_Drawing_Point.Y = 50
- $QueryADBox.Location = $System_Drawing_Point
- $QueryADBox.MaxLength = 15
- $QueryADBox.Name = "QueryADBox"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 134
- $QueryADBox.Size = $System_Drawing_Size
- $QueryADBox.TabIndex = 8
- $tabPage2.Controls.Add($QueryADBox)
- $QueryLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 304
- $System_Drawing_Point.Y = 24
- $QueryLabel.Location = $System_Drawing_Point
- $QueryLabel.Name = "QueryLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 157
- $QueryLabel.Size = $System_Drawing_Size
- $QueryLabel.TabIndex = 7
- $QueryLabel.Text = "Query AD:"
- $tabPage2.Controls.Add($QueryLabel)
- $QueryADBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 304
- $System_Drawing_Point.Y = 154
- $QueryADBTN.Location = $System_Drawing_Point
- $QueryADBTN.Name = "QueryADBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 133
- $QueryADBTN.Size = $System_Drawing_Size
- $QueryADBTN.TabIndex = 6
- $QueryADBTN.Text = "Query AD"
- $QueryADBTN.UseVisualStyleBackColor = $True
- $QueryADBTN.add_Click($QueryADBTN_OnClick)
- $tabPage2.Controls.Add($QueryADBTN)
- $WarningLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 31
- $System_Drawing_Point.Y = 194
- $WarningLabel.Location = $System_Drawing_Point
- $WarningLabel.Name = "WarningLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 54
- $System_Drawing_Size.Width = 158
- $WarningLabel.Size = $System_Drawing_Size
- $WarningLabel.TabIndex = 5
- $WarningLabel.Text = "WARNING: This action cannot be undone. Be sure this is the computer you want to rename."
- $tabPage2.Controls.Add($WarningLabel)
- $RenameCompBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 31
- $System_Drawing_Point.Y = 154
- $RenameCompBTN.Location = $System_Drawing_Point
- $RenameCompBTN.Name = "RenameCompBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 149
- $RenameCompBTN.Size = $System_Drawing_Size
- $RenameCompBTN.TabIndex = 4
- $RenameCompBTN.Text = "Rename Computer"
- $RenameCompBTN.UseVisualStyleBackColor = $True
- $RenameCompBTN.add_Click($RenameCompBTN_OnClick)
- $tabPage2.Controls.Add($RenameCompBTN)
- $NewCompBox.DataBindings.DefaultDataSourceUpdateMode = 0
- $NewCompBox.Font = New-Object System.Drawing.Font("Microsoft Sans Serif",8.25,2,3,0)
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 41
- $System_Drawing_Point.Y = 104
- $NewCompBox.Location = $System_Drawing_Point
- $NewCompBox.Name = "NewCompBox"
- $NewCompBox.MaxLength = 15
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 139
- $NewCompBox.Size = $System_Drawing_Size
- $NewCompBox.TabIndex = 3
- $tabPage2.Controls.Add($NewCompBox)
- $CUCompNameBox.DataBindings.DefaultDataSourceUpdateMode = 0
- $CUCompNameBox.Font = New-Object System.Drawing.Font("Microsoft Sans Serif",8.25,2,3,0)
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 41
- $System_Drawing_Point.Y = 50
- $CUCompNameBox.Location = $System_Drawing_Point
- $CUCompNameBox.Name = "CUCompNameBox"
- $CUCompNameBox.MaxLength = 15
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 139
- $CUCompNameBox.Size = $System_Drawing_Size
- $CUCompNameBox.TabIndex = 2
- $tabPage2.Controls.Add($CUCompNameBox)
- $NewCompName.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 9
- $System_Drawing_Point.Y = 77
- $NewCompName.Location = $System_Drawing_Point
- $NewCompName.Name = "NewCompName"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 121
- $NewCompName.Size = $System_Drawing_Size
- $NewCompName.TabIndex = 1
- $NewCompName.Text = "New Computer Name:"
- $tabPage2.Controls.Add($NewCompName)
- $OldCompName.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 9
- $System_Drawing_Point.Y = 24
- $OldCompName.Location = $System_Drawing_Point
- $OldCompName.Name = "OldCompName"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 138
- $OldCompName.Size = $System_Drawing_Size
- $OldCompName.TabIndex = 0
- $OldCompName.Text = "Current Computer Name:"
- $tabPage2.Controls.Add($OldCompName)
- ####Tab3
- $tabPage3.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 4
- $System_Drawing_Point.Y = 22
- $tabPage3.Location = $System_Drawing_Point
- $tabPage3.Name = "tabPage3"
- $System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
- $System_Windows_Forms_Padding.All = 3
- $System_Windows_Forms_Padding.Bottom = 3
- $System_Windows_Forms_Padding.Left = 3
- $System_Windows_Forms_Padding.Right = 3
- $System_Windows_Forms_Padding.Top = 3
- $tabPage3.Padding = $System_Windows_Forms_Padding
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 325
- $System_Drawing_Size.Width = 552
- $tabPage3.Size = $System_Drawing_Size
- $tabPage3.TabIndex = 2
- $tabPage3.Text = "Current System"
- $tabPage3.UseVisualStyleBackColor = $True
- $CompInfoTab.Controls.Add($tabPage3)
- $aboutbox.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 340
- $System_Drawing_Point.Y = 29
- $aboutbox.Location = $System_Drawing_Point
- $aboutbox.Name = "aboutbox"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 169
- $System_Drawing_Size.Width = 191
- $aboutbox.Size = $System_Drawing_Size
- $aboutbox.TabIndex = 13
- $aboutbox.TabStop = $False
- $aboutbox.Text = "About/Support"
- $tabPage3.Controls.Add($aboutbox)
- $AboutLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 7
- $System_Drawing_Point.Y = 16
- $AboutLabel.Location = $System_Drawing_Point
- $AboutLabel.Multiline = $True
- $AboutLabel.Name = "AboutLabel"
- $AboutLabel.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 91
- $System_Drawing_Size.Width = 178
- $AboutLabel.Size = $System_Drawing_Size
- $AboutLabel.TabIndex = 19
- $AboutLabel.Text = "PCRenamifer v3.1
- Questions or Support?
- $aboutbox.Controls.Add($AboutLabel)
- $CUSGetInfoBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $CUSGetInfoBTN.FlatAppearance.MouseOverBackColor = [System.Drawing.Color]::FromArgb(255,255,255,255)
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 155
- $CUSGetInfoBTN.Location = $System_Drawing_Point
- $CUSGetInfoBTN.Name = "CUSGetInfoBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 156
- $CUSGetInfoBTN.Size = $System_Drawing_Size
- $CUSGetInfoBTN.TabIndex = 12
- $CUSGetInfoBTN.Text = "Get Info"
- $CUSGetInfoBTN.UseVisualStyleBackColor = $True
- $CUSGetInfoBTN.add_Click($CUSGetInfoBTN_OnClick)
- $tabPage3.Controls.Add($CUSGetInfoBTN)
- $CUSSoftwareBTN.DataBindings.DefaultDataSourceUpdateMode = 0
- $CUSSoftwareBTN.Enabled = $False
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 195
- $CUSSoftwareBTN.Location = $System_Drawing_Point
- $CUSSoftwareBTN.Name = "CUSSoftwareBTN"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 156
- $CUSSoftwareBTN.Size = $System_Drawing_Size
- $CUSSoftwareBTN.TabIndex = 11
- $CUSSoftwareBTN.Text = "View Software"
- $CUSSoftwareBTN.UseVisualStyleBackColor = $True
- $CUSSoftwareBTN.add_Click($CUSSoftwareBTN_OnClick)
- $tabPage3.Controls.Add($CUSSoftwareBTN)
- $CUSModelOut.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 111
- $System_Drawing_Point.Y = 74
- $CUSModelOut.Location = $System_Drawing_Point
- $CUSModelOut.Name = "CUSModelOut"
- $CUSModelOut.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 141
- $CUSModelOut.Size = $System_Drawing_Size
- $CUSModelOut.TabIndex = 16
- $CUSModelOut.Text = "Current Model"
- $tabPage3.Controls.Add($CUSModelOut)
- $CUSCompModel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 83
- $CUSCompModel.Location = $System_Drawing_Point
- $CUSCompModel.Name = "CUSCompModel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 83
- $CUSCompModel.Size = $System_Drawing_Size
- $CUSCompModel.TabIndex = 9
- $CUSCompModel.Text = "Model"
- $tabPage3.Controls.Add($CUSCompModel)
- $CUSSDIOut.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 111
- $System_Drawing_Point.Y = 126
- $CUSSDIOut.Location = $System_Drawing_Point
- $CUSSDIOut.Name = "CUSSDIOut"
- $CUSSDIOut.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 141
- $CUSSDIOut.Size = $System_Drawing_Size
- $CUSSDIOut.TabIndex = 18
- $CUSSDIOut.Text = "Current SDI"
- $tabPage3.Controls.Add($CUSSDIOut)
- $CUSSerialOut.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 111
- $System_Drawing_Point.Y = 100
- $CUSSerialOut.Location = $System_Drawing_Point
- $CUSSerialOut.Name = "CUSSerialOut"
- $CUSSerialOut.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 141
- $CUSSerialOut.Size = $System_Drawing_Size
- $CUSSerialOut.TabIndex = 17
- $CUSSerialOut.Text = "Current Serial"
- $tabPage3.Controls.Add($CUSSerialOut)
- $CUSIPOut.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 111
- $System_Drawing_Point.Y = 42
- $CUSIPOut.Location = $System_Drawing_Point
- $CUSIPOut.Name = "CUSIPOut"
- $CUSIPOut.ReadOnly = $True
- $CUSIPOut.Multiline = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 141
- $CUSIPOut.Size = $System_Drawing_Size
- $CUSIPOut.TabIndex = 15
- $CUSIPOut.Text = "Current IP"
- $tabPage3.Controls.Add($CUSIPOut)
- $CUSCompNameOut.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 111
- $System_Drawing_Point.Y = 17
- $CUSCompNameOut.Location = $System_Drawing_Point
- $CUSCompNameOut.Name = "CUSCompNameOut"
- $CUSCompNameOut.ReadOnly = $True
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 20
- $System_Drawing_Size.Width = 141
- $CUSCompNameOut.Size = $System_Drawing_Size
- $CUSCompNameOut.TabIndex = 14
- $CUSCompNameOut.Text = "Current Name"
- $tabPage3.Controls.Add($CUSCompNameOut)
- $CUSSDILabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 129
- $CUSSDILabel.Location = $System_Drawing_Point
- $CUSSDILabel.Name = "CUSSDILabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 100
- $CUSSDILabel.Size = $System_Drawing_Size
- $CUSSDILabel.TabIndex = 4
- $CUSSDILabel.Text = "SDI:"
- $tabPage3.Controls.Add($CUSSDILabel)
- $CUSCompSsLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 106
- $CUSCompSsLabel.Location = $System_Drawing_Point
- $CUSCompSsLabel.Name = "CUSCompSsLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 100
- $CUSCompSsLabel.Size = $System_Drawing_Size
- $CUSCompSsLabel.TabIndex = 2
- $CUSCompSsLabel.Text = "Serial Number:"
- $tabPage3.Controls.Add($CUSCompSsLabel)
- $CUSCompIpLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 45
- $CUSCompIpLabel.Location = $System_Drawing_Point
- $CUSCompIpLabel.Name = "CUSCompIpLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 83
- $CUSCompIpLabel.Size = $System_Drawing_Size
- $CUSCompIpLabel.TabIndex = 1
- $CUSCompIpLabel.Text = "IP:"
- $tabPage3.Controls.Add($CUSCompIpLabel)
- $CUSCompNameLabel.DataBindings.DefaultDataSourceUpdateMode = 0
- $System_Drawing_Point = New-Object System.Drawing.Point
- $System_Drawing_Point.X = 22
- $System_Drawing_Point.Y = 20
- $CUSCompNameLabel.Location = $System_Drawing_Point
- $CUSCompNameLabel.Name = "CUSCompNameLabel"
- $System_Drawing_Size = New-Object System.Drawing.Size
- $System_Drawing_Size.Height = 23
- $System_Drawing_Size.Width = 100
- $CUSCompNameLabel.Size = $System_Drawing_Size
- $CUSCompNameLabel.TabIndex = 0
- $CUSCompNameLabel.Text = "Computer Name: "
- $tabPage3.Controls.Add($CUSCompNameLabel)
- #endregion Generated Form Code
- #Save the initial state of the form
- $InitialFormWindowState = $PCRename.WindowState
- #Init the OnLoad event to correct the initial state of the form
- $PCRename.add_Load($OnLoadForm_StateCorrection)
- #Show the Form
- $PCRename.ShowDialog()| Out-Null
- } #End Function
- #Call the Function
- GenerateForm
Advertisement
Add Comment
Please, Sign In to add comment