<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Patch Compliance for a host in vSphere Update Manager PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165094#M309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All patches are grouped in properties(lists of patches) according to their compliance status. You can see these properties by running:&lt;/P&gt;&lt;P&gt; $complianceStatus | gm -MemberType property *patches&lt;/P&gt;&lt;P&gt;I suppose that the patches you are looking for are not with NotCompliant status, therefore the $complianceStatus.NotCompliantPatches list is empty. They should be represented in some of the other properties (patch lists). Could you check this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing, I presume that the $complianceStatus in your case is a single object. If it is an array you have to explore each element of the array. Each element represents an association between &lt;/P&gt;&lt;P&gt;inventory item - baseline - patches included in the baseline, devided by their status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Biliana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Mar 2010 11:50:08 GMT</pubDate>
    <dc:creator>bbambalova</dc:creator>
    <dc:date>2010-03-29T11:50:08Z</dc:date>
    <item>
      <title>Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165089#M304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, Loving the cmdlets for VUM, great job !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get a list of the updates which apply to my host, I have done the following so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$VMHostObj = Get-VMHost testesx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$Baseline = Get-Baseline "ESXi Updates"&lt;/P&gt;&lt;P&gt;$Baseline | Attach-Baseline -Entity $VMHostObj&lt;/P&gt;&lt;P&gt;$VMHostObj | Scan-Inventory&lt;/P&gt;&lt;P&gt;Get-Compliance -Entity $VMHostObj &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have thought the Get-Complance object would contain a list of the patches which are missing from my host as per the below screenshot, but I cant seam to find them, any ideas? am I missing something ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!Patches.jpg!  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan Renouf&lt;/P&gt;&lt;P&gt;&lt;A href="http://virtu-al.net"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 10:29:46 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165089#M304</guid>
      <dc:creator>alanrenouf</dc:creator>
      <dc:date>2010-03-10T10:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165090#M305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the positive feedback!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must use the –Detailed parameter. The returned detailed compliance status contains lists of patches per each of the compliance statuses. You can retrieve the missing patches this way:&lt;/P&gt;&lt;P&gt;$complianceStatus = Get-Compliance -Entity $VMHostObj –Detailed&lt;/P&gt;&lt;P&gt;$complianceStatus.NotCompliantPatches&lt;/P&gt;&lt;P&gt;The NotCompliantPatches contains a list of the patches with NotCompliant/Missing status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Biliana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 10:55:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165090#M305</guid>
      <dc:creator>bbambalova</dc:creator>
      <dc:date>2010-03-10T10:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165091#M306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant thanks, I missed that parameter, havent seen it done like that before on any of the PowerCLI cmdlets, is that to speed things up unless the information is needed, kinda like adding retrieving the full object with Get-View ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you found this information useful, please consider awarding points for Correct or Helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan Renouf&lt;/P&gt;&lt;P&gt;&lt;A href="http://virtu-al.net"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 11:06:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165091#M306</guid>
      <dc:creator>alanrenouf</dc:creator>
      <dc:date>2010-03-10T11:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165092#M307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Alan you are right. This is to speed things up. It is similar to the way the Get-View provides the ability to specify the level of detail through –Property parameter, but in opposite direction. The default behavior of Get-View cmdlet is to return a VIObject with its full details/properties, while the Get-Compliance returns the possible smallest level of detail, until the -Detailed parameter is not used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Biliana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 14:55:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165092#M307</guid>
      <dc:creator>bbambalova</dc:creator>
      <dc:date>2010-03-11T14:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165093#M308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do the same as Alan but for VMs, I tried the same solution but it didn't work for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute the second command:&lt;/P&gt;&lt;P&gt;$complianceStatus.NotCompliantPatches&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it doesn't bring any answer, but if I used just the variable $complianceStatus it respond with all the detailed information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's there a reason because the command doesn't show just one field of the detailed information keep on the variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 21:49:16 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165093#M308</guid>
      <dc:creator>FrankLuciano</dc:creator>
      <dc:date>2010-03-26T21:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165094#M309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All patches are grouped in properties(lists of patches) according to their compliance status. You can see these properties by running:&lt;/P&gt;&lt;P&gt; $complianceStatus | gm -MemberType property *patches&lt;/P&gt;&lt;P&gt;I suppose that the patches you are looking for are not with NotCompliant status, therefore the $complianceStatus.NotCompliantPatches list is empty. They should be represented in some of the other properties (patch lists). Could you check this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing, I presume that the $complianceStatus in your case is a single object. If it is an array you have to explore each element of the array. Each element represents an association between &lt;/P&gt;&lt;P&gt;inventory item - baseline - patches included in the baseline, devided by their status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Biliana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Mar 2010 11:50:08 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165094#M309</guid>
      <dc:creator>bbambalova</dc:creator>
      <dc:date>2010-03-29T11:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165095#M310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Biliana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saved the result for the Get-Compliance -Entity $VMHostObj –Detailed into the variable $Test, then try to returns the values for each one of the properties that a got from the command $complianceStatus | gm -MemberType property *patches,but non of this returned any data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About what you said of the $complianceestatus, I'm trying the command for a single VM, and the VM has attached the two default baseline for the VMs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Critical VM Patches&lt;/P&gt;&lt;P&gt;  Non-Critical VM Patches&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I run the Get-Compliance command, in Baseline what I got is:&lt;/P&gt;&lt;P&gt;  VMware.VumAutomation.Types.UpgradeBaselineImpl, and&lt;/P&gt;&lt;P&gt;  VMware.VumAutomation.Types.PatchBaselineImpl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could this be related or I have to look somewhere else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Mar 2010 17:45:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165095#M310</guid>
      <dc:creator>FrankLuciano</dc:creator>
      <dc:date>2010-03-29T17:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Patch Compliance for a host</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165096#M311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can get the not compliant patches with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="code"&gt;
$VMHostObj = Get-VMHost YourHost.YourDomain.YourCountry
$ComplianceStatus = Get-Compliance -Entity $VMHostObj -Detailed
$ComplianceStatus | Select-Object -expandProperty NotCompliantPatches
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get the values of the other VMware.VumAutomation.Types.Patch[] properties of $ComplianceStatus in the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Mar 2010 21:44:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Patch-Compliance-for-a-host/m-p/1165096#M311</guid>
      <dc:creator>RvdNieuwendijk</dc:creator>
      <dc:date>2010-03-29T21:44:07Z</dc:date>
    </item>
  </channel>
</rss>

