VMware Cloud Community
tdubb123
Expert
Expert

vmware.vumautomation compare baseline

I got 2 baselines that I need to compare and show me what the different patches are

what cmdlet will do this?

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

Would something like this do?

$blName1 = 'Baseline 1'

$blName2 = 'Baseline 2'

$bl1 = Get-Baseline -Name $blName1

$bl2 = Get-Baseline -Name $blName2

Compare-Object -ReferenceObject $bl1.CurrentPatches -DifferenceObject $bl2.CurrentPatches -Property IdByVendor -IncludeEqual


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
tdubb123
Expert
Expert

Luc

That works. Thanks

Can I get the list of patches under each baseline?

Reply
0 Kudos
LucD
Leadership
Leadership

You can do something like this

foreach($bl in Get-Baseline){

    $bl.CurrentPatches |

    Select @{N='Baseline';E={$bl.Name}},

        @{N='Patch';E={$_.Name}},

        @{N='PatchDate';E={$_.ReleaseDate}},

        Vendor,

        @{N='VendorId';E={$_.IdByVendor}},

        @{N='Impact';E={$_.InstallationImpact -join ' | '}},

        Category,

        Severity

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos