PoshWsus-How to get the approved update list from a particular target group?

May 1, 2014 at 11:30 AM
Every month we approve the monthly patches to a particular test group in WSUS and then post testing, we approve it to production target group.
I want to get what all patches we approved for the production target group through PoshWSUS.
Any guidance/help is appreciated.
Thanks in advance.
May 7, 2014 at 11:19 AM
by the way i got it :)
May 7, 2014 at 1:54 PM
Can you share with us what you done?
May 9, 2014 at 6:47 PM
Lists all updates approval summaries for updates approved per every group.
Get-PoshWSUSUpdateApproval -UpdateScope (New-PoshWSUSUpdateScope)
List of updates approval summaries for updates approved per group "Server 2003".
$TargetGroupName = "Server 2003"
Get-PoshWSUSUpdateApproval -UpdateScope (New-PoshWSUSUpdateScope) | where { $_.TargetGroup -eq $TargetGroupName } | select UpdateTitle, TargetGroup
Select updates objects.
(Get-PoshWSUSUpdateApproval -UpdateScope (New-PoshWSUSUpdateScope) | where { $_.TargetGroup -eq $TargetGroupName }).GetUpdate()
May 13, 2014 at 10:48 AM
Hi Universal, thanks for your reply.
By the way my code is almost the same as yours :)

Import-Module Poshwsus
Connect-poshwsusServer -wsusserver Servername

If we want all the updates installed on the target group on a specific approved date: (which includes MBSA patches as well)

$updatescope = New-PoshWSUSUpdateScope -FromArrivalDate "01/01/2010"
$e= Get-PoshWSUSUpdateApproval -UpdateScope $updatescope
$e| where-object {$_.TargetGroup -like "sample1" -and $_.CreationDate -like "05/07/2014" }| select CreationDate,UpdateKB, Updatetitle | format-list >>new.txt

If we want all the updates installed on the target group till now.

$updatescope = New-PoshWSUSUpdateScope -FromArrivalDate "01/01/2010"
$e= Get-PoshWSUSUpdateApproval -UpdateScope $updatescope
$e| where-object {$_.TargetGroup -like "sample1"}| select CreationDate,UpdateKB, Updatetitle | format-list >>new1.txt