Powershell WPF密码框获取值
我想我只是有个小问题。 我用WPF为Powershell创建了一个GUI,在这个GUI中有一个密码框,现在我想将这个密码框中的清除值放入PS中的一个变量中Powershell WPF密码框获取值,wpf,powershell,xaml,passwordbox,Wpf,Powershell,Xaml,Passwordbox,我想我只是有个小问题。 我用WPF为Powershell创建了一个GUI,在这个GUI中有一个密码框,现在我想将这个密码框中的清除值放入PS中的一个变量中 <PasswordBox Name="PWBox" HorizontalAlignment="Left" Margin="147,75,0,0" VerticalAlignment="Top" Width="137" FontFamily="Century Gothic"/> 但是我在$password中没有任何值 正确的方法是
<PasswordBox Name="PWBox" HorizontalAlignment="Left" Margin="147,75,0,0" VerticalAlignment="Top" Width="137" FontFamily="Century Gothic"/>
但是我在$password中没有任何值
正确的方法是什么
提前感谢,,
Robin显示了什么?
$PWBox | GM
嗨,Paxz,安静了很多东西:TypeName:System.Windows.Controls.PasswordBox Name:SecurePassword成员类型:属性定义:securestring SecurePassword{get;}
$password = $PWBox.Password