<?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 Find VM Name from OS Hostnsme in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827321#M60309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that I know only the operating system host name, and I know that the virtual machine name is completely different from the OS host name, how can I query vcenter and find the virtual machine name that is associated with this operating system host name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$hostname = ”windowshostname”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get-vm | where-object{$_.something? -eq $hostname}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Feb 2019 03:15:47 GMT</pubDate>
    <dc:creator>TheVMinator</dc:creator>
    <dc:date>2019-02-23T03:15:47Z</dc:date>
    <item>
      <title>Find VM Name from OS Hostnsme</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827321#M60309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that I know only the operating system host name, and I know that the virtual machine name is completely different from the OS host name, how can I query vcenter and find the virtual machine name that is associated with this operating system host name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$hostname = ”windowshostname”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get-vm | where-object{$_.something? -eq $hostname}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2019 03:15:47 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827321#M60309</guid>
      <dc:creator>TheVMinator</dc:creator>
      <dc:date>2019-02-23T03:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find VM Name from OS Hostnsme</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827322#M60310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provided you have the VMware Tools installed on the VM, you can do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;hostname&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; ”windowshostname”&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;where-object&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{$&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;.Guest.HostName&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-eq&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;hostname&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2019 08:09:31 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827322#M60310</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-02-23T08:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find VM Name from OS Hostnsme</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827323#M60311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2019 22:19:12 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Find-VM-Name-from-OS-Hostnsme/m-p/1827323#M60311</guid>
      <dc:creator>TheVMinator</dc:creator>
      <dc:date>2019-02-23T22:19:12Z</dc:date>
    </item>
  </channel>
</rss>

