Intune Initial Scripts Backup
This commit is contained in:
45
dump/Software-Update-Group-Patches.ps1
Normal file
45
dump/Software-Update-Group-Patches.ps1
Normal file
@@ -0,0 +1,45 @@
|
||||
<#
|
||||
$SUG = "Server 2008 Required Updates",
|
||||
"Server 2008 R2 Requred Patches",
|
||||
"Server 2016 Required Patches",
|
||||
"Server 2019 Required Patches",
|
||||
"Server 2012 R2 Required Patches"
|
||||
|
||||
#$P | select LocalizedDisplayName,Updates
|
||||
|
||||
#$P = Get-CMSoftwareUpdateGroup | ? { $_.LocalizedDisplayName -eq "Server 2008 R2 Requred Patches" }
|
||||
$P | select LocalizedDisplayName, @{n="Updates";e={$_.Updates | Out-String}} | ft -Wrap
|
||||
|
||||
#>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$info = @()
|
||||
|
||||
ForEach ($item in $SUG)
|
||||
{
|
||||
# Write-host "Processing Software Update Group" $item
|
||||
|
||||
forEach ($item1 in (Get-CMSoftwareUpdate -Fast -UpdateGroupName $item))
|
||||
{
|
||||
$object = New-Object -TypeName PSObject
|
||||
$object | Add-Member -MemberType NoteProperty -Name UpdateGroup -Value $item
|
||||
$object | Add-Member -MemberType NoteProperty -Name ArticleID -Value $item1.ArticleID
|
||||
$object | Add-Member -MemberType NoteProperty -Name BulletinID -Value $item1.BulletinID
|
||||
$object | Add-Member -MemberType NoteProperty -Name Title -Value $item1.LocalizedDisplayName
|
||||
$info += $object
|
||||
$object
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#$Title = "Total assigned software updates in " + $item.LocalizedDisplayName + " = " + $info.count
|
||||
#$info | Out-GridView -Title "$Title"
|
||||
|
||||
|
||||
|
||||
|
||||
#Get-CMSoftwareUpdate -Fast -UpdateGroupName "Server 2008 Required Updates"
|
||||
|
||||
Reference in New Issue
Block a user