PoshWSUS icon indicating copy to clipboard operation
PoshWSUS copied to clipboard

Get-PSWSUSUpdateApproval ignores parameter -ComputerTargetGroups

Open larksyrm opened this issue 9 years ago • 2 comments

If i supply the parameter -ComputerTargetGroups to Get-PSWSUSUpdateApproval it simply outputs all approvals for ALL groups and ignores whatever i throw at it.

screenshot 430

Am i just missing something or is this currently not working?

BR, Johannes

larksyrm avatar Sep 07 '16 13:09 larksyrm

Strictly speaking it's not ignoring the TargetGroup you've specified. It's current;y pulling a list of all updates within that group (or groups), and then as a separate action it's looking up the approvals for each of those updates, meaning that it will show you all TargetGroups a patch is assigned to.

You'll notice in your screenshot that each individual patch is repeated 8 times, and that 'Sunday_0100' appears once within each of these repetitions.

I personally agree that this isn't the behavior I expect as a user. @proxb I'm about to fire through a PR with a potential change to Get-PSWSUSUpdateApproval to adjust this behaviour.

Windos avatar Oct 18 '16 12:10 Windos

@Windos Thanks for the PR! I merged it into the repo. I haven't had the time to address this so definitely helps out!

proxb avatar Oct 18 '16 17:10 proxb