Get-CMSiteMaintenanceTask missing properties?

Mike-C 1 Reputation point
2020-12-16T19:10:55.447+00:00

I am trying to document all of the settings we are using for Site Maintenance tasks in SCCM/MECM 1910

I'm using the PowerShell cmdlet Get-CMSiteMaintenanceTask, but I'm not seeing all of the settings.

For example, the "Backup Site Server Properties" task has the following in the CM Console:

48710-bu.png

When I run Get-CMSiteMaintenanceTask I don't see all of the properties, such as Alerts or the Schedule. I'm not sure how to convert the DaysOfWeek setting, but that is minor compared to actual missing properties

48862-ps.png

Other Maintenance Tasks have similar missing properties.

Do you know of any way to pull these settings? Can I get them straight from the SQL Database if PowerShell is not able to get the information?

Microsoft Configuration Manager
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 43,061 Reputation points Microsoft Vendor
    2020-12-17T03:14:46.003+00:00

    @Mike-C
    Thank you for posting in Microsoft Q&A forum.

    I'm not sure how to convert the DaysOfWeek setting

    The value of DaysOfWeek is relate to the schedule, the corresponding values for each day are as follows:
    Sunday 1
    Monday 2
    Tuesday 4
    Wednesday 8
    Thursday 16
    Friday 32
    Saturday 64
    So if you set the schedule Wednesday and Sunday, the value will be 1+8=9.
    https://learn.microsoft.com/en-us/windows/win32/taskschd/weeklytrigger-daysofweek?redirectedfrom=MSDN#remarks
    And the Enable alert property is really missing but the option is only for "Backup Site Server".


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.