SHARE
TWEET

Untitled

a guest Jul 15th, 2019 131 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <# This form was created using POSHGUI.com  a free online gui designer for PowerShell
  2. .NAME
  3.     Untitled
  4. #>
  5.  
  6. Add-Type -AssemblyName System.Windows.Forms
  7. [System.Windows.Forms.Application]::EnableVisualStyles()
  8.  
  9. $Form                            = New-Object system.Windows.Forms.Form
  10. $Form.ClientSize                 = '302,311'
  11. $Form.text                       = "Change my Password"
  12. $Form.TopMost                    = $false
  13.  
  14. $Button1                         = New-Object system.Windows.Forms.Button
  15. $Button1.BackColor               = "#d6c7c7"
  16. $Button1.text                    = "Change Password"
  17. $Button1.width                   = 130
  18. $Button1.height                  = 25
  19. $Button1.location                = New-Object System.Drawing.Point(92,132)
  20. $Button1.Font                    = 'Microsoft Sans Serif,10'
  21. $Button1.ForeColor               = ""
  22.  
  23. $Label1                          = New-Object system.Windows.Forms.Label
  24. $Label1.text                     = "Username:"
  25. $Label1.AutoSize                 = $true
  26. $Label1.width                    = 25
  27. $Label1.height                   = 10
  28. $Label1.location                 = New-Object System.Drawing.Point(13,16)
  29. $Label1.Font                     = 'Microsoft Sans Serif,12,style=Bold'
  30.  
  31. $username                        = New-Object system.Windows.Forms.Label
  32. $username.text                   = "username"
  33. $username.AutoSize               = $true
  34. $username.width                  = 25
  35. $username.height                 = 10
  36. $username.location               = New-Object System.Drawing.Point(125,17)
  37. $username.Font                   = 'Microsoft Sans Serif,12'
  38.  
  39. $Label2                          = New-Object system.Windows.Forms.Label
  40. $Label2.text                     = "Password:"
  41. $Label2.AutoSize                 = $true
  42. $Label2.width                    = 25
  43. $Label2.height                   = 10
  44. $Label2.location                 = New-Object System.Drawing.Point(14,57)
  45. $Label2.Font                     = 'Microsoft Sans Serif,12,style=Bold'
  46.  
  47. $Confirm                         = New-Object system.Windows.Forms.Label
  48. $Confirm.text                    = "Confirm:"
  49. $Confirm.AutoSize                = $true
  50. $Confirm.width                   = 25
  51. $Confirm.height                  = 10
  52. $Confirm.location                = New-Object System.Drawing.Point(18,95)
  53. $Confirm.Font                    = 'Microsoft Sans Serif,12,style=Bold'
  54.  
  55. $psw                             = New-Object system.Windows.Forms.MaskedTextBox
  56. $psw.PasswordChar                = "*"
  57. $psw.multiline                   = $false
  58. $psw.width                       = 155
  59. $psw.height                      = 20
  60. $psw.location                    = New-Object System.Drawing.Point(118,52)
  61. $psw.Font                        = 'Microsoft Sans Serif,12'
  62.  
  63. $psw2                            = New-Object system.Windows.Forms.MaskedTextBox
  64. $psw2.multiline                  = $false
  65. $psw2.PasswordChar                = "*"
  66. $psw2.width                      = 157
  67. $psw2.height                     = 20
  68. $psw2.location                   = New-Object System.Drawing.Point(118,89)
  69. $psw2.Font                       = 'Microsoft Sans Serif,12'
  70.  
  71. $Label3                          = New-Object system.Windows.Forms.Label
  72. $Label3.text                     = "Password Requirements"
  73. $Label3.AutoSize                 = $true
  74. $Label3.width                    = 25
  75. $Label3.height                   = 10
  76. $Label3.location                 = New-Object System.Drawing.Point(13,176)
  77. $Label3.Font                     = 'Microsoft Sans Serif,10,style=Bold,Underline'
  78.  
  79. $Label4                          = New-Object system.Windows.Forms.Label
  80. $Label4.text                     = "Length: Minimum 8 Characters"
  81. $Label4.AutoSize                 = $true
  82. $Label4.width                    = 25
  83. $Label4.height                   = 10
  84. $Label4.location                 = New-Object System.Drawing.Point(17,210)
  85. $Label4.Font                     = 'Microsoft Sans Serif,10'
  86.  
  87. $Label5                          = New-Object system.Windows.Forms.Label
  88. $Label5.text                     = "Special Character (e.g  !, $, #, %)"
  89. $Label5.AutoSize                 = $true
  90. $Label5.width                    = 25
  91. $Label5.height                   = 10
  92. $Label5.location                 = New-Object System.Drawing.Point(17,230)
  93. $Label5.Font                     = 'Microsoft Sans Serif,10'
  94.  
  95. $Label6                          = New-Object system.Windows.Forms.Label
  96. $Label6.text                     = "If you have issues contact IT"
  97. $Label6.AutoSize                 = $true
  98. $Label6.width                    = 25
  99. $Label6.height                   = 10
  100. $Label6.location                 = New-Object System.Drawing.Point(31,283)
  101. $Label6.Font                     = 'Microsoft Sans Serif,10,style=Bold,Italic'
  102.  
  103. $Label7                          = New-Object system.Windows.Forms.Label
  104. $Label7.text                     = "Uppercase and Number"
  105. $Label7.AutoSize                 = $true
  106. $Label7.width                    = 25
  107. $Label7.height                   = 10
  108. $Label7.location                 = New-Object System.Drawing.Point(18,252)
  109. $Label7.Font                     = 'Microsoft Sans Serif,10'
  110.  
  111. $Form.controls.AddRange(@($Button1,$Label1,$username,$Label2,$Confirm,$psw,$psw2,$Label3,$Label4,$Label5,$Label6,$Label7))
  112.  
  113.  
  114. $username.Text = $env:USERNAME
  115.  
  116.  
  117. #Write your logic code here
  118.  
  119. [void]$Form.ShowDialog()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top