I want find out if there is any Exchange database schedule running, or will run in the next few hours. However, I couldn’t figure out how to compare the scheduleinterval object with a variable I created with get-date or (get-date).addhours(20)
The scheduleInterval I am looking at is
C:\>(get-mailboxdatabase | where {$_.name -like 'database'}).maintenanceschedule | Get-Member
TypeName: Microsoft.Exchange.Common.ScheduleInterval
Name MemberType Definition
---- ---------- ----------
CompareTo Method int CompareTo(System.Object value), int CompareTo(Microsoft.Exchange.Common.ScheduleInterval...
ConjointWith Method bool ConjointWith(Microsoft.Exchange.Common.ScheduleInterval other)
Contains Method bool Contains(Microsoft.Exchange.Common.WeekDayAndTime dt), bool Contains(System.DateTime dt...
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
Overlaps Method bool Overlaps(Microsoft.Exchange.Common.ScheduleInterval other)
ToString Method string ToString()
EndDay Property System.DayOfWeek EndDay {get;}
EndHour Property System.Int32 EndHour {get;}
EndMinute Property System.Int32 EndMinute {get;}
EndTime Property Microsoft.Exchange.Common.WeekDayAndTime EndTime {get;}
Length Property System.TimeSpan Length {get;}
StartDay Property System.DayOfWeek StartDay {get;}
StartHour Property System.Int32 StartHour {get;}
StartMinute Property System.Int32 StartMinute {get;}
StartTime Property Microsoft.Exchange.Common.WeekDayAndTime StartTime {get;}
Any help is much appreciated.
Thanks
Here a way to test if a job is running at the
Get-Datevalue.Maybe the comparison can be done casting
starttime/endtime propertiesto[datetime]but I can’t test, I’m just supposing..