Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $totalhflist = @()
- foreach ($node in $nodes)
- {
- Write-Verbose ("" + (TS) + "Getting hotfix info for $node")
- Get-Hotfix -ComputerName $node | % {
- $hfitem = "" | Select Node, HotfixID
- $hfitem.Node = $node
- $hfitem.HotfixID = $_.HotfixID
- $totalhflist += $hfitem
- }
- }
- $allhfnames = $totalhflist.HotfixId | Sort-Object -Unique
- $hfdiscrepancylist = @()
- Write-Verbose ("" + (TS) + "Generating Hotfix Comparison Report for $Cluster")
- foreach ($hf in $allhfnames)
- {
- if (($totalhflist | ? {$_.HotfixID -eq $hf}).count -ne $nodes.count)
- {
- $hfditem = "" | Select HotfixID
- $hfditem.HotfixID = $hf
- foreach ($node in $nodes)
- {
- $hfditem | Add-Member -NotePropertyName $node -NotePropertyValue ([boolean]($totalhflist | ? {$_.Node -eq $Node -and $_.hotfixID -eq $hf}))
- }
- $hfdiscrepancylist += $hfditem
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement