<?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: Get-View Guest.Hostname property returning null in vSphere Update Manager PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698946#M677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the late reply.&amp;nbsp; I understand that $_.Guest.Hostname returns the VM machine name.&amp;nbsp; My problem is that the query is returning nothing in the second part of my select statement.&amp;nbsp; The first column should return the VM name, and the second column should return the VM machine name.&amp;nbsp; I don't know why it's not returning the latter.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And just to clarify, I'm not interested in the ESXi host name.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 19:08:50 GMT</pubDate>
    <dc:creator>amarcy</dc:creator>
    <dc:date>2015-08-04T19:08:50Z</dc:date>
    <item>
      <title>Get-View Guest.Hostname property returning null</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698944#M675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone tell me why this one liner only returns the VM name and not the Guest Host name?&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Get-View -ViewType VirtualMachine -Property Name -Filter @{"Guest.HostName" = ".*$prompt.*"} | Select @{N='VM Name';E={$_.Name}}, @{N='Guest Host Name';E={$_.Guest.HostName}} | ft -wrap -auto&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:38:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698944#M675</guid>
      <dc:creator>amarcy</dc:creator>
      <dc:date>2015-06-24T15:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get-View Guest.Hostname property returning null</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698945#M676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$_.Guest.Hostname is not the ESXi host, it's the name of the VM.&amp;nbsp; You could see the host by selecting Get-VMhost -id $_.Runtime.Host, since you're using Get-View.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 16:31:26 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698945#M676</guid>
      <dc:creator>DZ1</dc:creator>
      <dc:date>2015-06-24T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get-View Guest.Hostname property returning null</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698946#M677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the late reply.&amp;nbsp; I understand that $_.Guest.Hostname returns the VM machine name.&amp;nbsp; My problem is that the query is returning nothing in the second part of my select statement.&amp;nbsp; The first column should return the VM name, and the second column should return the VM machine name.&amp;nbsp; I don't know why it's not returning the latter.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And just to clarify, I'm not interested in the ESXi host name.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 19:08:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698946#M677</guid>
      <dc:creator>amarcy</dc:creator>
      <dc:date>2015-08-04T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get-View Guest.Hostname property returning null</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698947#M678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out, I was missing the Guest.HostName property when defining parameters of get-view:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-View -ViewType VirtualMachine -Property Name, Guest.HostName &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 19:25:08 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Get-View-Guest-Hostname-property-returning-null/m-p/2698947#M678</guid>
      <dc:creator>amarcy</dc:creator>
      <dc:date>2015-08-04T19:25:08Z</dc:date>
    </item>
  </channel>
</rss>

