Get-ScheduledTask does not return monthly, or monthly day of week triggers.

So having worked with the Task Scheduler Library in Windows over the last few weeks it's a real problem area of Windows

I've already mentioned the issue that deprecated features still appear in the user interface.

The next area to note is that the Get-ScheduledTask PowerShell cmdlet is not fully functional. If you create a scheduled task with a monthly trigger (or a monthly day of week trigger) this cannot be read using the cmdlet.

Instead of a fully fledged object like you would receive from the other trigger types you instead receive the base object.

MSFT_TaskTrigger

Enabled               : True
EndBoundary           :
ExecutionTimeLimit    :
Id                    :
Repetition            : MSFT_TaskRepetitionPattern
StartBoundary         : 2017-10-18T19:31:14
PSComputerName        :
CimClass              : Root/Microsoft/Windows/TaskScheduler:MSFT_TaskTrigger
CimInstanceProperties : {Enabled, EndBoundary, ExecutionTimeLimit, Id...}
CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties

I was hoping that the limitation was with the PowerShell cmdlets however on checking it seems that the limitation is with the underlying WMI in the ROOT\Microsoft\Windows\TaskScheduler namespace.

The only option in this case is to parse the XML configuration files directly. Not pleasant.

Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Enable function lock for F1-F12 on HP ZBook mobile workstations