Closed LinkOps closed 4 years ago
This is in relation to the following blog post you made and more a suggestion for improvement.
https://www.scconfigmgr.com/2018/07/12/send-your-patching-manifest-to-teams/
I have an ADR setup to make a new Software Update Group everytime it runs and therefore the Software Update group changes month on month. To get the Latest Software Update Group made by the Automatic Deployment Rule you can use the following:
$ADR = "Microsoft Product Updates ADR"
$SUGInfo = Get-CMSoftwareUpdateGroup -verbose:$false | Where LocalizedDescription -eq $ADR | Sort-Object DateCreated -Descending | Select-Object -First 1 | Select-Object -ExpandProperty CI_ID
This is likely not the best way to do it but I'm new to Powershell so feel free to update as needed to make it more efficient.
This is in relation to the following blog post you made and more a suggestion for improvement.
https://www.scconfigmgr.com/2018/07/12/send-your-patching-manifest-to-teams/
I have an ADR setup to make a new Software Update Group everytime it runs and therefore the Software Update group changes month on month. To get the Latest Software Update Group made by the Automatic Deployment Rule you can use the following:
$ADR = "Microsoft Product Updates ADR"
$SUGInfo = Get-CMSoftwareUpdateGroup -verbose:$false | Where LocalizedDescription -eq $ADR | Sort-Object DateCreated -Descending | Select-Object -First 1 | Select-Object -ExpandProperty CI_ID
This is likely not the best way to do it but I'm new to Powershell so feel free to update as needed to make it more efficient.