Attach a script to a custom image that run at deployment

Matthieu Noiret 26 Reputation points


My objective is to create a custom image that automatically install a certain product on the VM.

The problem is that some installation settings are depending on the configuration of the computer so I need to run the installation script at deployment.

I didn't find any features on the Azure platform which allows me to do that so if anyone as an idea ?

Thank you,

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,813 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChristopherW-MSFT 1,601 Reputation points

    Hi @Matthieu Noiret

    Azure VM's Custom Script Extension should do the trick:
    If you're able to run the Installation through PowerShell in the VM, then the Custom Script Extension will automatically run it after Startup.

    Windows Task Scheduler can also be setup to automatically run PowerShell on Startup, or Software Installation.

    And another solution would be to use GPO for Domain Joined machines:

0 additional answers

Sort by: Most helpful