PowerShell script exchange
Post Reply
ftbug
Enthusiast
Posts: 59
Liked: 2 times
Joined: Nov 18, 2015 10:12 am
Full Name: Freddie
Contact:

Maintenance window schedule

Post by ftbug »

Hi, we currently have daily backups of a SQL server that we run an escrow job on once a month.
We are currently stopping this backup manually on the 25th of every month, however, we would like to automate this backup to stop for that day, or even during a certain time period on the 25th every month.
is there a way to script this using a scheduled task for instance to disable and then re-enable the backups once a month?
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Maintenance window schedule

Post by veremin »

Schedule the following scripts via Windows Task Scheduler and you're good to go:

Code: Select all

Asnp VeeamPSSnapin
Get-VBRJob -name "Name of your backup Job" | Disable-VBRJob

Code: Select all

Asnp VeeamPSSnapin
Get-VBRJob -name "Name of your backup Job" | Enable-VBRJob
Thanks.
ftbug
Enthusiast
Posts: 59
Liked: 2 times
Joined: Nov 18, 2015 10:12 am
Full Name: Freddie
Contact:

Re: Maintenance window schedule

Post by ftbug »

Great,

Thank you very much
ftbug
Enthusiast
Posts: 59
Liked: 2 times
Joined: Nov 18, 2015 10:12 am
Full Name: Freddie
Contact:

Re: Maintenance window schedule

Post by ftbug »

Hi Vladimir,

I have just checked on the server that we require the powershell script to be used, and there is no icon for powershell from there. I have checked on some other Veeam servers and we can access it from the tools menu, however, on this particular veeam server the icon is not available
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Maintenance window schedule

Post by veremin »

What product version are you currently at? What happens if you open Windows PowerShell and try to add our PowerShell snap-in, using the following command:

Code: Select all

Asnp VeeamPSSnapin
If you get error or something similar, kindly, install PowerShell snap-in, using VB&R installation file.

Everything above applies to versions prior to 9, because version 9 has PS snap-in installed by default.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests