我正在尝试自动化管理 WSUS 报告的过程。我设法向 WSUS 控制台报告我批准的更新。II) 为超级种子运行清理进程
所以我用来列出批准的更新更新的脚本是:
$updatescope = New-Object Microsoft.UpdateServices.Administration.UpdateScope
$updatescope.ApprovedStates = [Microsoft.UpdateServices.Administration.ApprovedStates]::LatestRevisionApproved
$updatescope.FromArrivalDAte = [datetime]"10/08/2013"
$wsusgroup = $wsus.GetComputerTargetGroups() | Where {$_.Name -eq "PCM_WSUS_spec"}
$updatescope
$updatescope.gettype()
$updatescope.count
$updateScope.ApprovedComputerTargetGroups.add($wsusgroup)
$wsus.GetUpdates($updatescope) | Select KnowledgebaseArticles,Title
$Updates = $wsus.GetUpdates($updatescope) | Select KnowledgebaseArticles
我真正需要的是一个函数来列出基于 aboce 列表被取代的更新;在给定日期之后获得批准的更新。
有任何想法吗?