Skip to content

Instantly share code, notes, and snippets.

@MyITGuy
Created September 19, 2024 20:08
Show Gist options
  • Save MyITGuy/998102820920aaed757d048752fcdf14 to your computer and use it in GitHub Desktop.
Save MyITGuy/998102820920aaed757d048752fcdf14 to your computer and use it in GitHub Desktop.
function Get-WsusSynchronizationHistory {
[CmdletBinding()]
param()
begin {
$IUpdateServer = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer()
$ISubscription = $IUpdateServer.GetSubscription()
$SynchronizationHistoryCollection = $ISubscription.GetSynchronizationHistory()
}
process {
$SynchronizationHistoryCollection
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment