![PowerShell](https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png)
We can use the ProtectedData class for this
Add-Type -AssemblyName System.Security;
[Text.Encoding]::ASCII.GetString([Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String("some base64 encoded text"), $null, 'CurrentUser'))
Or
[Text.Encoding]::ASCII.GetString([Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String("some base64 encoded text"), $null, 'LocalMachine'))