<?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 Get all hosts of a certain processor type in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919571#M107475</link>
    <description>&lt;P&gt;I have one VMhost with a particular processor type. It is the sole host which has this particular processor in the cluster, which unfortunately is preventing vMotion. I'm going to power down the VMs and move them at some point, but in the meantime I would like to just try to find another host in the environment with the same processor type so I can vMotion the VMs to that one. I can use this command to get the processor type:&lt;BR /&gt;&lt;BR /&gt;get-vmhost -name MYHOST.MYDOMAIN.COM | select Name,&lt;BR /&gt;@{N='ESXi CPU Type';E={$_.ProcessorType}}&lt;/P&gt;&lt;P&gt;This returns:&lt;BR /&gt;Name ESXi CPU Type&lt;BR /&gt;---- -------------&lt;BR /&gt;MYHOST.MYDOMAIN.COM AMD EPYC 7713 64-Core Processor&lt;/P&gt;&lt;P&gt;I now want to find any hosts in the environment running the same CPU, to do this I'm running this:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;get-vmhost | Where-Object {$_.ProcessorType -in '&lt;/SPAN&gt;&lt;SPAN&gt;AMD EPYC 7713 64-Core Processor'} | select Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, this is returning no results at all, even the one that I know exists. What am I doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 21:09:58 GMT</pubDate>
    <dc:creator>dbutch1976</dc:creator>
    <dc:date>2022-07-27T21:09:58Z</dc:date>
    <item>
      <title>Get all hosts of a certain processor type</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919571#M107475</link>
      <description>&lt;P&gt;I have one VMhost with a particular processor type. It is the sole host which has this particular processor in the cluster, which unfortunately is preventing vMotion. I'm going to power down the VMs and move them at some point, but in the meantime I would like to just try to find another host in the environment with the same processor type so I can vMotion the VMs to that one. I can use this command to get the processor type:&lt;BR /&gt;&lt;BR /&gt;get-vmhost -name MYHOST.MYDOMAIN.COM | select Name,&lt;BR /&gt;@{N='ESXi CPU Type';E={$_.ProcessorType}}&lt;/P&gt;&lt;P&gt;This returns:&lt;BR /&gt;Name ESXi CPU Type&lt;BR /&gt;---- -------------&lt;BR /&gt;MYHOST.MYDOMAIN.COM AMD EPYC 7713 64-Core Processor&lt;/P&gt;&lt;P&gt;I now want to find any hosts in the environment running the same CPU, to do this I'm running this:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;get-vmhost | Where-Object {$_.ProcessorType -in '&lt;/SPAN&gt;&lt;SPAN&gt;AMD EPYC 7713 64-Core Processor'} | select Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, this is returning no results at all, even the one that I know exists. What am I doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 21:09:58 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919571#M107475</guid>
      <dc:creator>dbutch1976</dc:creator>
      <dc:date>2022-07-27T21:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get all hosts of a certain processor type</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919669#M107482</link>
      <description>&lt;P&gt;Can you try with&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Get-VMHost | 
Where-Object {$_.ProcessorType -match [Regex]::Escape('AMD EPYC 7713 64-Core Processor')} | 
select Name&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 07:32:32 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919669#M107482</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-07-21T07:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get all hosts of a certain processor type</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919733#M107491</link>
      <description>&lt;P&gt;It worked. Now what the heck is going on in this script, lol, specifically:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;[Regex]::Escape&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 12:46:18 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919733#M107491</guid>
      <dc:creator>dbutch1976</dc:creator>
      <dc:date>2022-07-21T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get all hosts of a certain processor type</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919736#M107493</link>
      <description>&lt;P&gt;The -match operator expects a RegEx on the right-hand side.&lt;BR /&gt;But since a ProcessorType value might contain some "special" RegEx characters (like [,],...) I escaped them by using this RegEx::Escape() function.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 12:54:34 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-all-hosts-of-a-certain-processor-type/m-p/2919736#M107493</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-07-21T12:54:34Z</dc:date>
    </item>
  </channel>
</rss>

