I have a single WSUS server running on 2012R2, using WID rather than full SQL. WSUS is set to synchronise on a schedule. I want to be able to trigger a PowerShell script when a synchronisation has resulted in new updates being downloaded. However, I can't
find a way to do this. So far I have looked at:
WSUS console: The only related setting I can find is notification by email.
Scheduled task: WSUS adds a random offset of up to 30 minutes to the synchronisation times, so I can't schedule a task to accurately coincide with the synchronisation.
Event Log: When I first started this, I naively assumed WSUS would be logging information events when it synchronised and that I would be able to make an event-triggered scheduled task. However, I cannot find any such events in the Windows event log, or
any mention of relevant event IDs from Googling. I've found references to event IDs for various synchronisation errors, but nothing for normal, successful synchronisation.
I've found tantalising references in SoftwareDistribution.log such as:
instead of using the WSUS built-in sync-scheduler, configure your WSUS for manual-sync, and then could you use a schedule task to launch PoshWSUS to start a sync and it then executes your 'other script' ?
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.