Does anyone have any great ways to troubleshoot scripted actions?
T.L.D.R: We're getting an error with a scripted action, but don't get the error when we run the same script in Azure or at the system level.
We wanted to take Tony's article (How to Use Azure Files with AADJ Method for AVD – Nerdio Help Center) and make it happen with Secure Variables instead of having storage account keys in clear text.
However, when we run the CMDKEY command, it's failing on that step when that command runs in a scripted action. When we run it in Azure (obviously without the secure variables) or in a system-level PowerShell window, it works correctly.
Error:
CMDKEY: This command requires either the /U switch and a username or else the /smartcard switch with a smartcard.
$storageAccount="$($SecureVars.FSLgxStorageAccount)"
$user="localhost\$($storageAccount)"
$secret="$SecureVars.FSLgxSecret"
cmdkey.exe /add:$($fileServer) /user:$($user) /pass:$($secret)
Comments (1 comment)