Hi guys.
I have been writing a powershell script to stop backups in case of a failure of power to a server (if the server goes down in the middle of a backup it sometimes corrupts a job). This way, if the UPS powerfail triggers, it should smoothly clean itself up.
Stopping the backups is easy, but what I want to do next is disable the backup job until we intervene and turn it back on.
I can't for the life of me find a property in any object that lets me toggle the "disable job" setting on the job property sheet.
Is this possible? and if so, which property should I set to false?
Thanks,
mark
-
- Novice
- Posts: 5
- Liked: never
- Joined: Jan 19, 2011 11:17 am
- Full Name: Mark Firestone
- Contact:
Re: Disabled
Hello Mark,
Let me consult with our powershell guru, and I will post back the answer.
Let me consult with our powershell guru, and I will post back the answer.
-
- Service Provider
- Posts: 22
- Liked: 1 time
- Joined: Oct 14, 2009 4:23 am
- Contact:
Re: Disabled
I would also be interested in knowing this.
edit: that or the possibility to change the targetdir in a backup job (using powershell of course)
Thanks
edit: that or the possibility to change the targetdir in a backup job (using powershell of course)
Thanks
Re: Disabled
To disable a job:
About changing backup target folder with PowerShell - this is not implemented in the product right now.
Code: Select all
#first get the job object
$bjname = "bj1*"
$oldJob = Get-VBRJob | ? {$_.Name -like $bjname}
#to disable or enable job scheduler just call appropriate method of the job object
$oldJob.DisableScheduler()
$oldJob.EnableScheduler()
#to get the current state of scheduler options use the following method. It return BOOLEAN
$oldJob.get_IsScheduleEnabled()
Who is online
Users browsing this forum: Bing [Bot] and 7 guests