We have windows servers that do application initialization which takes almost 3-4 hours for servers to be online. So to avoid downtime we use autoscaling group lifecycle hooks. Now we want to shut down all the servers at night and start them in the morning for cost optimization. Is it possible to run the PowerShell user-data script on the restart of the server? I followed link here however, cloud-init does not support Windows PowerShell user-data format as per this link.
Any suggestions would be a great help. Thank you.