xWindowsUpdateAgent is from the xWindowsUpdate DSC module.
The resources can be used as part of a solution to a strictly defined schedule, but it's not complete by itself.
You can configure the machine in two ways:
Use xWindowsUpdateAgent
to set the category, and source of updates. Using ScheduledInstallation will rely on the local Windows Update
schedule to download and install updates.
Use DSC
’s remediation schedule to drive update installs (exclusively or in addition to the Windows Update agent’s schedule).
This requires using UpdateNow in your xWindowsUpdateAgent
configuration, and setting the Local Configuration Manager’s Configuration Mode to ApplyAndAutoCorrect.
Updates will be checked for and installed based on the ConfigurationModeFrequencyMins.
You will also need to decide a reboot strategy for the updates, using either RebootIfNeeded or the machine’s reboot cycle for updating.
To achieve an absolute schedule, you could create a scheduled task to Start-DSCConfiguration
on a configuration based on the second option above with UpdateNow.
This isn't the most straightforward approach, and would reevaluate any other settings in your configuration as well on the same schedule.
You could also use a scheduled task more directly to simply automate calls to the Windows Update Agent itself on a schedule (wuauclt.exe /updatenow
), bypassing DSC. Creating a task like this is certainly doable with DSC, but I don't know of any existing resource that does it all in one. You'd need to write your own.