Forum Discussion
sassmath
Sep 27, 2023Copper Contributor
PowerShell code does not work
PS C:\Foo> $PasswordHT = @{ >> String = 'Pa$$w0rd' >> AsPlainText = $true >> Force = $true >> } PS C:\Foo> $SecurePW = ConvertTo-SecureString @$PasswordHT ConvertTo-SecureString : La valeu...
- Sep 28, 2023
Your code has one small syntax error.
In your final line, it should be "@PasswordHT" rather than "@$PasswordHT".
Cheers,
Lain
LainRobertson
Sep 28, 2023Silver Contributor
Your code has one small syntax error.
In your final line, it should be "@PasswordHT" rather than "@$PasswordHT".
Cheers,
Lain
sassmath
Sep 28, 2023Copper Contributor
Thank you so much for solving my problem.