0

I am extremely new to PowerShell tool making so forgive my ignorance. I imported the WPK module and am trying to create a box with multiple fields. One of those fields is a password field but it shows the password as it's being typed. I am unsure of how to make it so that while typing the text is hidden.

      New-TextBlock -Text "Database Login Name" `
        -Row 2 -Column 0 -VerticalAlignment Center -Margin 5        

      New-TextBox -Name DbLoginId  `
        -Row 2 -Column 1 -Margin 4 

      New-TextBlock -Text "Db Login Password" `
        -Row 3 -Column 0 -VerticalAlignment Center -Margin 5        

      New-TextBox -Name DbLoginPassword  `
        -Row 3 -Column 1 -Margin 4 

Just a heads up, I am not a programmer what so ever. I am a Database Administrator but I have been thrown into this development project so I am literally learning on the fly right about now.

user2561924
  • 47
  • 2
  • 6

1 Answers1

1

Change your password TextBox to a PasswordBox.

  New-PasswordBox -Name DbLoginPassword  `
    -Row 3 -Column 1 -Margin 4
Rynant
  • 23,153
  • 5
  • 57
  • 71
  • I cannot believe it was that easy! All the google searches I have done never once mentioned that PasswordBox actually existed in WPK. Thank You! – user2561924 Mar 04 '14 at 17:57
  • 1
    No problem! If you want to see all of the CmdLets included with WPK, you can use: `gcm -Module WPK| ogv` The filter at the top of the window that opens is useful for narrowing down the results. – Rynant Mar 04 '14 at 18:54