Problem:
During an Azure deployment, you receive the following error with the Custom Script Extension:
“Provisioning of VM extension CustomScriptExtension has timed out. Extension provisioning has taken too long to complete. The extension did not report a message. More information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot”
Solution:
Validate all the parameters for the script are called in the ARM template and ensure your values in the “CommandToExecute” are enclosed in quotes.
Explanation:
While this error is vague and could be thrown in many scenarios, in my Azure deployments I have found that it usually stems from one of two issues. Either the script had a param block with mandatory parameters and I failed to specify one of the mandatory parameters or one of the values supplied to the “CommandToExecute” has a space or special character and needs to be enclosed in quotes.