# convert SecureString to a plain text # (the system method requires clear-text) $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password) $plain = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
cmdlet Test-Password at command pipeline position 1 Supply values for the following parameters: Domain: dell7390 Username: remotinguser2 Password: *********** True PS C:\> Test-Password
cmdlet Test-Password at command pipeline position 1 Supply values for the following parameters: Domain: doesnotexist Username: testuser Password: ******** Exception: Line | 47 | throw"Test-Password: Domain '$Domain' not found." | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Test-Password: Domain 'doesnotexist' not found.