Dmitry Porotnikov / Quick custom script extention test via Azure CLI

Created Wed, 16 Jul 2025 00:00:00 +0100 Modified Wed, 16 Jul 2025 00:00:00 +0100
75 Words

Quick custom script extention test via Azure CLI

If you are unsure, if it is an issue with your script or with custom script extention itself, you can always test with a short Azure CLI one-liner, and primitive script, to exlude CSE issue. Like so:

  az vm extension set \
  --resource-group CSE \
  --vm-name CSETEST \
  --name CustomScriptExtension \
  --publisher Microsoft.Compute \
  --version 1.10 \
  --protected-settings '{ "commandToExecute": "powershell -ExecutionPolicy Unrestricted -Command \"Write-Host hello-world\"" }'