Differences
This shows you the differences between the selected revisions of the page.
2018-09-18 | 2020-06-05 | ||
full form (martin) | more details about the encrypted password (martin) | ||
Line 63: | Line 63: | ||
You can also leverage Windows Data Protection API to encrypt the password in the %%XML%% file. | You can also leverage Windows Data Protection API to encrypt the password in the %%XML%% file. | ||
- | To encrypt the password use ''[[ps>microsoft.powershell.security/convertfrom-securestring|ConvertFrom-SecureString]]'' cmdlet: | + | If you want to encrypt the password within the configuration file, you can use use ''[[ps>microsoft.powershell.security/convertfrom-securestring|ConvertFrom-SecureString]]'' cmdlet. Put the following code to an ad-hoc script (or an interactive PowerShell console): |
<code powershell> | <code powershell> | ||
Line 80: | Line 80: | ||
</code> | </code> | ||
- | To decrypt the password, use ''[[ps>microsoft.powershell.security/convertto-securestring|ConvertTo-SecureString]]'' cmdlet and assign the resulting ''[[dotnet>system.security.securestring|SecureString]]'' to ''SessionOptions.SecurePassword'': | + | To decrypt the password, use ''[[ps>microsoft.powershell.security/convertto-securestring|ConvertTo-SecureString]]'' cmdlet and assign the resulting ''[[dotnet>system.security.securestring|SecureString]]'' to [[library_sessionoptions#securepassword|''SessionOptions.SecurePassword'']], instead of using plain text ''SessionOptions.Password'': |
<code powershell> | <code powershell> | ||
Line 130: | Line 130: | ||
You can also leverage Windows Data Protection API to encrypt the password in the XML file. | You can also leverage Windows Data Protection API to encrypt the password in the XML file. | ||
- | To encrypt the password use PowerShell ''ConvertFrom-SecureString'' cmdlet: | + | If you want to encrypt the password within the configuration file, you can use use PowerShell ''ConvertFrom-SecureString'' cmdlet: |
<code> | <code> |