Google Cloud Platform (GCP) gives you the option to add a startup script to your instance. The script will run every time the instance is started. The startup script can be a Windows batch script, PowerShell or a shell script if using Linux. For Windows instances you have the option to add a sysprep-specialize script