I am able to get a connection string for a FileShare I created in a Azure storage account. I can use this in a PowerShell script. However, the connection sting provided by Microsoft contains the access key. I would like to mask this and have the connection string use the Azure Key Vault. How would I do this?
$connectTestResult = Test-NetConnection -ComputerName [FileShare] -Port 445 if ($connectTestResult.TcpTestSucceeded) { # Save the password so the drive will persist on reboot cmd.exe /C "cmdkey /add:[FileShare]" /user:"[user]" /pass:"[password]"" # Mount the drive New-PSDrive -Name Z -PSProvider FileSystem -Root "[FileSharePath]" -Persist } else { Write-Error -Message "Error" }