PS C:\> $PowerShellCommand =
$headers=@{"X-IDENTITY-HEADER"=$env:IDENTITY_HEADER}
$response = Invoke-WebRequest -UseBasicParsing -Uri "$($env:IDENTITY_ENDPOINT)?resource=https://storage.azure.com/&api-version=2019-08-01" -Headers $headers
$response.RawContent
PS C:\> $base64Cmd = [System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($PowerShellCommand))
PS C:\> $Command = "powershell -enc $($base64Cmd)"
PS C:\> Invoke-AzureRMWebAppShellCommand `
-KuduURI "https://mycoolwindowswebapp.scm.azurewebsites.net/api/command" `
-token $ARMToken `
-Command $Command