May 24 2021 12:46 AM
I have made below script and it is working fine but im not able to surpress warning message.
anyone can assist
$CIID = Get-CMSoftwareUpdateGroup -Name "Patching 2021-04-13 10:36:11" | %{$_.Updates}
Foreach ($CIIDs in $CIID)
{
Try {
Get-CMSoftwareUpdate -Id $CIIDs | %{$_.IsSuperseded} -WarningAction Ignore
} Catch
{
Write-Warning ""
}
}
WARNING: 'Get-CMSoftwareUpdate' supports -Fast for retrieving objects without loading lazy properties. Loading lazy properties can cause significant performance penalties