Snag some free swag from us while sharing your top challenges & successes. Learn more >

Hyper-V Auto-start VMs - Patching Module Post-Reboot Script

Chris Higham
Chris Higham Member
edited January 24 in Solutions

Product Name: Hyper-V Auto-start VMs - Patching Module Post-Reboot Script

Version: 1.0

Description : This script will execute commands to determine if any saved state VMs exist on the Hyper V Host after waiting 15 minutes to allow them time to start on their own. If saved state VMs exist, it will loop thru all of them starting the VMs with a 90 sec delay in between starts. It will send an email letting you know VMs were in a saved state.
You will need to upload the ps1 file attached to managed files as well and reference that file in writefile line.

Instructions :

1. Import Procedure and name appropriate to your VSA.

2. Upload ps1 to Managed Files and change writefile line to be the path you chose in maanged files.

3. Add this to the post-reboot section of Patching module for Hyper V Servers or use as suits your needs for starting Hyper V Host Saved State VMs.