Maintenance Window Analysis
Log In or Register to download the BES file, and more.

0 Votes

Description

This analysis reports the established maintenance window and status of managed computers.

Use the Task Enforce Maintenance Window with Client Locking to tie a computer's Lock State to its maintenance window.

Property Details

ID29
TitleMaintenance Window Analysis
KeywordsMaintenance Window TABLE TBODY maintenance
Added by on 10/17/2012 1:16:36 PM
Last Modified by on 10/17/2012 1:16:36 PM
Counters 3358 Views / 15 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Properties

In Maintenance Window
Period Every Report
 
  * Results in a "string"/number
Show indented relevance
((now > item 1 of it) AND (if (item 0 of it = "once") then ((item 1 of it & item 2 of it)) else if (item 0 of it = "daily") then ((item 1 of it + ((now - item 1 of it) / day / item 3 of it * (day * item 3 of it))) & item 2 of it) else if (item 0 of it = "weekly") then (it & ((value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer) * minute)) of (maximum of (it - 1*day; it - 2*day; it - 3*day; it - 4*day; it - 5*day; it -6 * day;it; it + 1*day; it + 2*day;it + 3*day;it + 4*day;it + 5*day;it + 6*day) whose (it < now AND (((value of setting "MaintenanceWindow_DaysOfWeek" of client as string as lowercase)) contains (first 3 of (it as string) as day_of_week as string as lowercase))) of (((current date - item 0 of it) / (item 3 of it * week) * (item 3 of it * week)) + item 0 of it & item 1 of it) of ((((date (local time zone) of item 1 of it - ((first 3 of (item 1 of it as string) as day_of_week) - sunday))) , time (local time zone) of item 1 of it, item 2 of it, item 3 of it))) else if (item 0 of it = "monthly") then (it & (value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer * minute)) of ((if (item 3 of it = 0) then (maximum of ((if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of (current month & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of (current month & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing) ; (if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (if (current month as integer = 1) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - month) & ((current year) - 1* year)) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else ((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing) ; (if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - (2*month)) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (if (current month as integer = 1) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - (2*month)) & ((current year) - 1* year)) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else ((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - (2*month)) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing)) whose (it < now)) else (maximum of ((if exists ((current month & (day_of_month (item 3 of it)))) then (((current month & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing) ; (if exists (((current month - 1* month) & (day_of_month (item 3 of it)))) then (if (current month as integer = 1) then ((((current month - 1*month) & (day_of_month (item 3 of it))) & (current year - 1*year)) & time (local time zone) of item 1 of it) else (((current month - 1*month) & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing) ; (if exists (((current month - 2*month) & (day_of_month (item 3 of it)))) then (if (current month as integer = 1) then ((((current month - 2*month) & (day_of_month (item 3 of it))) & (current year - 1*year)) & time (local time zone) of item 1 of it) else (((current month - 2*month) & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing)) whose (it < now)))) else error "invalid maintenance type") contains now) of (value of setting "MaintenanceWindow_RepeatType" of client, (value of setting "MaintenanceWindow_StartTime" of client & " " & local time zone as string) as time, (value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer) * minute, value of setting "MaintenanceWindow_RepeatInterval" of client as integer)
Maintenance Window Description
Period Every Report
 
  * Results in a "string"/number
Show indented relevance
((if (item 0 of it = "once") then ("Once at " & item 1 of it as string) else (if (item 0 of it = "daily") then ("Every " & item 2 of it as string & " days starting on '" & item 1 of it as string) else (if (item 0 of it = "weekly") then ("Every " & item 3 of it as string & " of every " & item 2 of it as string & " weeks starting on " & item 1 of it as string) else (if (item 0 of it = "monthly") then (if (item 2 of it as integer != 0) then ("On day " & item 2 of it as string & " of every month starting on " & item 1 of it as string) else ("On the " & ((if it as integer = 1 then "first" else if it as integer = 2 then "second" else if it as integer = 3 then "third" else if it as integer = 4 then "forth" else it) of (value of setting "MaintenanceWindow_DayOrdinal" of client as string)) & " " & item 3 of it as string & " of the month, starting on " & item 1 of it as string)) else (error "Could not parse Maintenance Window"))))) & " for " & (value of setting "MaintenanceWindow_WindowSizeMinutes" of client) & " Minutes") of (value of setting "MaintenanceWindow_RepeatType" of client, (value of setting "MaintenanceWindow_StartTime" of client & " " & local time zone as string) as time, value of setting "MaintenanceWindow_RepeatInterval" of client, value of setting "MaintenanceWindow_DaysOfWeek" of client)
Maintenance Window Settings
Period Every Report
 
  * Results in a "string"/number
Show indented relevance
(name of it, values of it) of settings whose(name of it contains "MaintenanceWindow") of client
Last Maintenance Window
Period Every Report
 
  * Results in a "string"/number
Show indented relevance
if now > (value of setting "MaintenanceWindow_StartTime" of client & " " & local time zone as string) as time then ((if (item 0 of it = "once") then ((item 1 of it & item 2 of it)) else if (item 0 of it = "daily") then ((item 1 of it + ((now - item 1 of it) / day / item 3 of it * (day * item 3 of it))) & item 2 of it) else if (item 0 of it = "weekly") then (it & ((value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer) * minute)) of (maximum of (it - 1*day; it - 2*day; it - 3*day; it - 4*day; it - 5*day; it -6 * day;it; it + 1*day; it + 2*day;it + 3*day;it + 4*day;it + 5*day;it + 6*day) whose (it < now AND (((value of setting "MaintenanceWindow_DaysOfWeek" of client as string as lowercase)) contains (first 3 of (it as string) as day_of_week as string as lowercase))) of (((current date - item 0 of it) / (item 3 of it * week) * (item 3 of it * week)) + item 0 of it & item 1 of it) of ((((date (local time zone) of item 1 of it - ((first 3 of (item 1 of it as string) as day_of_week) - sunday))) , time (local time zone) of item 1 of it, item 2 of it, item 3 of it))) else if (item 0 of it = "monthly") then (it & (value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer * minute)) of ((if (item 3 of it = 0) then (maximum of ((if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of (current month & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of (current month & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing) ; (if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (if (current month as integer = 1) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - month) & ((current year) - 1* year)) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else ((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing) ; (if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - (2*month)) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (if (current month as integer = 1) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - (2*month)) & ((current year) - 1* year)) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else ((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month - (2*month)) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing)) whose (it < now)) else (maximum of ((if exists ((current month & (day_of_month (item 3 of it)))) then (((current month & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing) ; (if exists (((current month - 1* month) & (day_of_month (item 3 of it)))) then (if (current month as integer = 1) then ((((current month - 1*month) & (day_of_month (item 3 of it))) & (current year - 1*year)) & time (local time zone) of item 1 of it) else (((current month - 1*month) & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing) ; (if exists (((current month - 2*month) & (day_of_month (item 3 of it)))) then (if (current month as integer = 1) then ((((current month - 2*month) & (day_of_month (item 3 of it))) & (current year - 1*year)) & time (local time zone) of item 1 of it) else (((current month - 2*month) & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing)) whose (it < now)))) else error "invalid maintenance type")) of (value of setting "MaintenanceWindow_RepeatType" of client, (value of setting "MaintenanceWindow_StartTime" of client & " " & local time zone as string) as time, (value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer) * minute, value of setting "MaintenanceWindow_RepeatInterval" of client as integer) else nothing
Next Maintenance Window
Period Every Report
 
  * Results in a "string"/number
Show indented relevance
if now > (value of setting "MaintenanceWindow_StartTime" of client & " " & local time zone as string) as time then ((if (item 0 of it = "once") then (if (end of (item 1 of it & item 2 of it) > now) then (item 1 of it & item 2 of it) else nothing) else if (item 0 of it = "daily") then ((item 1 of it + ((((now - item 1 of it) / day / item 3 of it) +1) * (day * item 3 of it))) & item 2 of it) else if (item 0 of it = "weekly") then (it & ((value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer) * minute)) of (minimum of (it; it + 1*day; it + 2*day;it + 3*day;it + 4*day;it + 5*day;it + 6*day; it+ 7*day; it + 8*day; it + 9*day;it + 10*day;it + 11*day;it + 12*day;it + 13*day) whose (it > now AND (((value of setting "MaintenanceWindow_DaysOfWeek" of client as string as lowercase)) contains (first 3 of (it as string) as day_of_week as string as lowercase))) of ((((current date - item 0 of it) / (item 3 of it * week) +1) * (item 3 of it * week)) + item 0 of it & item 1 of it) of ((((date (local time zone) of item 1 of it - ((first 3 of (item 1 of it as string) as day_of_week) - sunday))) , time (local time zone) of item 1 of it, item 2 of it, item 3 of it))) else if (item 0 of it = "monthly") then (it & (value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer * minute)) of ((if (item 3 of it = 0) then (minimum of ((if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of (current month & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of (current month & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing) ; (if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month + month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (if (current month as integer = 12) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month + month) & ((current year) + 1* year)) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else ((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month + month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing) ; (if exists (first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month + 2*month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week)) then (if (current month as integer = 12) then (((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month + 2*month) & ((current year) + 1* year)) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else ((first (value of setting "MaintenanceWindow_DaysOfWeek" of client as day_of_week) of ((current month + 2*month) & current year) + ((value of setting "MaintenanceWindow_DayOrdinal" of client as integer - 1) * week))) & time (local time zone) of item 1 of it) else nothing)) whose (it > now)) else (minimum of ((if exists ((current month & (day_of_month (item 3 of it)))) then (((current month & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing) ; (if exists (((current month + 1* month) & (day_of_month (item 3 of it)))) then (if (current month as integer = 12) then ((((current month + 1*month) & (day_of_month (item 3 of it))) & (current year + 1*year)) & time (local time zone) of item 1 of it) else (((current month + 1*month) & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing) ; (if exists (((current month + 2* month) & (day_of_month (item 3 of it)))) then (if (current month as integer = 12) then ((((current month + 2*month) & (day_of_month (item 3 of it))) & (current year + 1*year)) & time (local time zone) of item 1 of it) else (((current month + 2*month) & (day_of_month (item 3 of it))) & current year) & time (local time zone) of item 1 of it) else nothing)) whose (it > now)))) else error "invalid maintenance type")) of (value of setting "MaintenanceWindow_RepeatType" of client, (value of setting "MaintenanceWindow_StartTime" of client & " " & local time zone as string) as time, (value of setting "MaintenanceWindow_WindowSizeMinutes" of client as integer) * minute, value of setting "MaintenanceWindow_RepeatInterval" of client as integer) else nothing

Relevance

Used in 2 fixlets and 1 analsis   * Results in a true/false
Show indented relevance
exists settings whose(name of it = "MaintenanceWindow_StartTime" AND exists value of it) of client

Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!