Advertisement
Guest User

Untitled

a guest
Jul 14th, 2019
273
0
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                 = '266,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(93,133)
  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(13,96)
  53. $Confirm.Font                    = 'Microsoft Sans Serif,12,style=Bold'
  54.  
  55. $psw                             = New-Object system.Windows.Forms.MaskedTextBox
  56. $psw.multiline                   = $false
  57. $psw.width                       = 123
  58. $psw.height                      = 20
  59. $psw.location                    = New-Object System.Drawing.Point(119,52)
  60. $psw.Font                        = 'Microsoft Sans Serif,12'
  61.  
  62. $psw2                            = New-Object system.Windows.Forms.MaskedTextBox
  63. $psw2.multiline                  = $false
  64. $psw2.width                      = 123
  65. $psw2.height                     = 20
  66. $psw2.location                   = New-Object System.Drawing.Point(118,89)
  67. $psw2.Font                       = 'Microsoft Sans Serif,12'
  68.  
  69. $Label3                          = New-Object system.Windows.Forms.Label
  70. $Label3.text                     = "Password Requirements"
  71. $Label3.AutoSize                 = $true
  72. $Label3.width                    = 25
  73. $Label3.height                   = 10
  74. $Label3.location                 = New-Object System.Drawing.Point(13,176)
  75. $Label3.Font                     = 'Microsoft Sans Serif,10,style=Bold,Underline'
  76.  
  77. $Label4                          = New-Object system.Windows.Forms.Label
  78. $Label4.text                     = "Length: Minimum 8 Characters"
  79. $Label4.AutoSize                 = $true
  80. $Label4.width                    = 25
  81. $Label4.height                   = 10
  82. $Label4.location                 = New-Object System.Drawing.Point(17,210)
  83. $Label4.Font                     = 'Microsoft Sans Serif,10'
  84.  
  85. $Label5                          = New-Object system.Windows.Forms.Label
  86. $Label5.text                     = "Special Character (e.g  !, $, #, %)"
  87. $Label5.AutoSize                 = $true
  88. $Label5.width                    = 25
  89. $Label5.height                   = 10
  90. $Label5.location                 = New-Object System.Drawing.Point(17,230)
  91. $Label5.Font                     = 'Microsoft Sans Serif,10'
  92.  
  93. $Label6                          = New-Object system.Windows.Forms.Label
  94. $Label6.text                     = "If you have issues contact IT"
  95. $Label6.AutoSize                 = $true
  96. $Label6.width                    = 25
  97. $Label6.height                   = 10
  98. $Label6.location                 = New-Object System.Drawing.Point(31,283)
  99. $Label6.Font                     = 'Microsoft Sans Serif,10,style=Bold,Italic'
  100.  
  101. $Label7                          = New-Object system.Windows.Forms.Label
  102. $Label7.text                     = "Uppercase and Number"
  103. $Label7.AutoSize                 = $true
  104. $Label7.width                    = 25
  105. $Label7.height                   = 10
  106. $Label7.location                 = New-Object System.Drawing.Point(18,252)
  107. $Label7.Font                     = 'Microsoft Sans Serif,10'
  108.  
  109. $Form.controls.AddRange(@($Button1,$Label1,$username,$Label2,$Confirm,$psw,$psw2,$Label3,$Label4,$Label5,$Label6,$Label7))
  110. $username.Text = $env:USERNAME
  111.  
  112.  
  113.  
  114.  
  115. #Write your logic code here
  116.  
  117. [void]$Form.ShowDialog()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement