Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <# This form was created using POSHGUI.com a free online gui designer for PowerShell
- .NAME
- Untitled
- #>
- Add-Type -AssemblyName System.Windows.Forms
- [System.Windows.Forms.Application]::EnableVisualStyles()
- $Form = New-Object system.Windows.Forms.Form
- $Form.ClientSize = '302,311'
- $Form.text = "Change my Password"
- $Form.TopMost = $false
- $Button1 = New-Object system.Windows.Forms.Button
- $Button1.BackColor = "#d6c7c7"
- $Button1.text = "Change Password"
- $Button1.width = 130
- $Button1.height = 25
- $Button1.location = New-Object System.Drawing.Point(92,132)
- $Button1.Font = 'Microsoft Sans Serif,10'
- $Button1.ForeColor = ""
- $Label1 = New-Object system.Windows.Forms.Label
- $Label1.text = "Username:"
- $Label1.AutoSize = $true
- $Label1.width = 25
- $Label1.height = 10
- $Label1.location = New-Object System.Drawing.Point(13,16)
- $Label1.Font = 'Microsoft Sans Serif,12,style=Bold'
- $username = New-Object system.Windows.Forms.Label
- $username.text = "username"
- $username.AutoSize = $true
- $username.width = 25
- $username.height = 10
- $username.location = New-Object System.Drawing.Point(125,17)
- $username.Font = 'Microsoft Sans Serif,12'
- $Label2 = New-Object system.Windows.Forms.Label
- $Label2.text = "Password:"
- $Label2.AutoSize = $true
- $Label2.width = 25
- $Label2.height = 10
- $Label2.location = New-Object System.Drawing.Point(14,57)
- $Label2.Font = 'Microsoft Sans Serif,12,style=Bold'
- $Confirm = New-Object system.Windows.Forms.Label
- $Confirm.text = "Confirm:"
- $Confirm.AutoSize = $true
- $Confirm.width = 25
- $Confirm.height = 10
- $Confirm.location = New-Object System.Drawing.Point(18,95)
- $Confirm.Font = 'Microsoft Sans Serif,12,style=Bold'
- $psw = New-Object system.Windows.Forms.MaskedTextBox
- $psw.PasswordChar = "*"
- $psw.multiline = $false
- $psw.width = 155
- $psw.height = 20
- $psw.location = New-Object System.Drawing.Point(118,52)
- $psw.Font = 'Microsoft Sans Serif,12'
- $psw2 = New-Object system.Windows.Forms.MaskedTextBox
- $psw2.multiline = $false
- $psw2.PasswordChar = "*"
- $psw2.width = 157
- $psw2.height = 20
- $psw2.location = New-Object System.Drawing.Point(118,89)
- $psw2.Font = 'Microsoft Sans Serif,12'
- $Label3 = New-Object system.Windows.Forms.Label
- $Label3.text = "Password Requirements"
- $Label3.AutoSize = $true
- $Label3.width = 25
- $Label3.height = 10
- $Label3.location = New-Object System.Drawing.Point(13,176)
- $Label3.Font = 'Microsoft Sans Serif,10,style=Bold,Underline'
- $Label4 = New-Object system.Windows.Forms.Label
- $Label4.text = "Length: Minimum 8 Characters"
- $Label4.AutoSize = $true
- $Label4.width = 25
- $Label4.height = 10
- $Label4.location = New-Object System.Drawing.Point(17,210)
- $Label4.Font = 'Microsoft Sans Serif,10'
- $Label5 = New-Object system.Windows.Forms.Label
- $Label5.text = "Special Character (e.g !, $, #, %)"
- $Label5.AutoSize = $true
- $Label5.width = 25
- $Label5.height = 10
- $Label5.location = New-Object System.Drawing.Point(17,230)
- $Label5.Font = 'Microsoft Sans Serif,10'
- $Label6 = New-Object system.Windows.Forms.Label
- $Label6.text = "If you have issues contact IT"
- $Label6.AutoSize = $true
- $Label6.width = 25
- $Label6.height = 10
- $Label6.location = New-Object System.Drawing.Point(31,283)
- $Label6.Font = 'Microsoft Sans Serif,10,style=Bold,Italic'
- $Label7 = New-Object system.Windows.Forms.Label
- $Label7.text = "Uppercase and Number"
- $Label7.AutoSize = $true
- $Label7.width = 25
- $Label7.height = 10
- $Label7.location = New-Object System.Drawing.Point(18,252)
- $Label7.Font = 'Microsoft Sans Serif,10'
- $Form.controls.AddRange(@($Button1,$Label1,$username,$Label2,$Confirm,$psw,$psw2,$Label3,$Label4,$Label5,$Label6,$Label7))
- $username.Text = $env:USERNAME
- #Write your logic code here
- [void]$Form.ShowDialog()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement