<?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: Determine vCenter name from VM or ESX Host in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433755#M9063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The vCenter Server name is in the Uid property. You can use the string Split() method to extract the vCenter Server name:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Get-VM&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; | &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Select-Object&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; Name,@{N&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;vCenter&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;E&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.Uid.Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[1].Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[0]}}
&lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Get-VMHost&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; | &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Select-Object&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; Name,@{N&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;vCenter&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;E&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.Uid.Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[1].Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[0]}}&lt;/SPAN&gt;

&lt;/PRE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 13:31:26 GMT</pubDate>
    <dc:creator>RvdNieuwendijk</dc:creator>
    <dc:date>2013-04-23T13:31:26Z</dc:date>
    <item>
      <title>Determine vCenter name from VM or ESX Host</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433752#M9060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Am trying to determine a way to fetch vCenter name for the VM / ESX host is registered to. Is there a vSphere CLI script I can use ? &lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;This is needed because we receive an alert from monitoring agents saying so and so VM or so and so ESX server is down. Rather than hopping between multiple vCenters we should a have more simpler way to find vCenter name through some mechanism. Please advise.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;thanks a ton in advance.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Shaheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 04:29:23 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433752#M9060</guid>
      <dc:creator>shaheer_sham</dc:creator>
      <dc:date>2013-04-23T04:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Determine vCenter name from VM or ESX Host</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433753#M9061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Discussion moved from &lt;A _jive_internal="true" href="https://communities.vmware.com/community/vmtn/server/vcenter"&gt;VMware vCenter™&lt;/A&gt; to &lt;A _jive_internal="true" href="https://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli"&gt;VMware vSphere™ PowerCLI&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 13:19:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433753#M9061</guid>
      <dc:creator>MauroBonder</dc:creator>
      <dc:date>2013-04-23T13:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Determine vCenter name from VM or ESX Host</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433754#M9062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;welcome shaheer!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what we've done in our environment to address the similer concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pingforinfo.com/powercli-sccript-for-exporting-vm-details-to-html/"&gt;http://pingforinfo.com/powercli-sccript-for-exporting-vm-details-to-html/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we've autamated it with the help of windows task scheduler. Now we have the VM inverntory dailiy. So whenecer a VM failurre alert comes its just the mater of searching the inventory (HTML) file with the VM name.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 13:25:45 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433754#M9062</guid>
      <dc:creator>Sreejesh_D</dc:creator>
      <dc:date>2013-04-23T13:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Determine vCenter name from VM or ESX Host</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433755#M9063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The vCenter Server name is in the Uid property. You can use the string Split() method to extract the vCenter Server name:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Get-VM&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; | &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Select-Object&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; Name,@{N&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;vCenter&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;E&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.Uid.Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[1].Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[0]}}
&lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Get-VMHost&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; | &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0; font-weight: bold;"&gt;Select-Object&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; Name,@{N&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;vCenter&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;E&lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.Uid.Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[1].Split(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)[0]}}&lt;/SPAN&gt;

&lt;/PRE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 13:31:26 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Determine-vCenter-name-from-VM-or-ESX-Host/m-p/433755#M9063</guid>
      <dc:creator>RvdNieuwendijk</dc:creator>
      <dc:date>2013-04-23T13:31:26Z</dc:date>
    </item>
  </channel>
</rss>

