none
Retrieve long term backup schedule time with DPM Shell RRS feed

  • Question

  • I'm working on a script to reschedule the date of long term tape jobs. I do not want the time of day to change, just the day of the week. I can use Set-PolicySchedule to set the date, time, and interval. The problem is retrieving the currently scheduled time. I can use:

    $pg = Get-ProtectionGroup -DPMServerName SERVERNAME
    $SC = Get-PolicySchedule $pg[index] -longterm Tape

    and $SC[index] will get me the schedule. How do I extract the time?

    Monday, April 4, 2011 12:47 AM

Answers

  • After reviewing my Powershell commands, I found what I was looking for with:

    $SC[index] | Get-Member.

    I needed:

    $SC[index].ScheduleTime

    • Marked as answer by EdMVP Friday, April 8, 2011 7:32 PM
    Friday, April 8, 2011 7:32 PM

All replies

  • $SC[index].WeekDays will return an array of weekdays scheduled.

    Each object of that array is an enum corresponding to weekday, with name (Su, Mo ... etc).

    From this with some powershell scripting, you should be able to get your requirements working.

    Thanks,
    Arun.

     

    • Proposed as answer by ArunKumar M Thursday, April 7, 2011 8:38 AM
    Tuesday, April 5, 2011 8:06 AM
  • After reviewing my Powershell commands, I found what I was looking for with:

    $SC[index] | Get-Member.

    I needed:

    $SC[index].ScheduleTime

    • Marked as answer by EdMVP Friday, April 8, 2011 7:32 PM
    Friday, April 8, 2011 7:32 PM