PowerShell script exchange
Post Reply
shrry8
Lurker
Posts: 2
Liked: never
Joined: Mar 31, 2019 10:59 am
Full Name: Srsiddiqui
Contact:

Shutdown & restart VM after Backup Job

Post by shrry8 »

Hi,

is it possible to shutdown a vm before doing backup / start it again after backup is complete?

Infrastructure is purely on Hyper-V 2012. If i am not wrong there are must be some PowerShell scripts for that

Veeam is installed on a separate machine

Thanks
Srsiddiqui
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Shutdown & restart VM after Backup Job

Post by nielsengelen »

You can leverage scripts before and after a job, more info can be found via https://helpcenter.veeam.com/docs/backu ... l?ver=95u4

Out of interest; why do you want to shut down the VM first?
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
shrry8
Lurker
Posts: 2
Liked: never
Joined: Mar 31, 2019 10:59 am
Full Name: Srsiddiqui
Contact:

Re: Shutdown & restart VM after Backup Job

Post by shrry8 »

Hi,

But if we don't shutdown the VM than it will first take the snapshot and then take the backup. Correct me if I am wrong
Currently we to automate the backup process.

From where i can get the working scripts for this purpose.
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Shutdown & restart VM after Backup Job

Post by veremin »

Correct, the snapshot will be taken from running VM in this case, but are there restrictions for this matter in your environment?

As to the scripts, take a look at general Hyper-V cmdlets - Stop-VM, for instance.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests