PowerShell script exchange
Post Reply
Posts: 5
Liked: never
Joined: Jan 19, 2011 11:17 am
Full Name: Mark Firestone


Post by mark_firestone »

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?


Alexey D.

Re: Disabled

Post by Alexey D. »

Hello Mark,

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

Re: Disabled

Post by sjutras »

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)

Alexey D.

Re: Disabled

Post by Alexey D. »

To disable a job:

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


#to get the current state of scheduler options use the following method. It return BOOLEAN
About changing backup target folder with PowerShell - this is not implemented in the product right now.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests