Hi
I have the following code to create PSCredential and get the password value from key vault
$Username = ‘Test’
$password = ConvertTo-SecureString (Get-AzKeyVaultSecret -VaultName KeyVault01 -Name ‘deploy’).SecretValue -AsPlainText -Force
$credential = New-Object PSCredential($Username, $password)
Running the command I get the following results where the password is not converted
UserName Password
deploy System.Security.SecureString
Does anyone know how to resolve this, I need to access key to retrive password so it can be authenticated to remote computer share
Regards
Raxso123