title: PowerCLI Get VMs those fit some conditions
body: <p>I'm trying to get our some Linux distros from vCenter by using PowerCLI. But I don't want to get Appliance VMs. So I have 2 different successful PowerCLI scripts those can find these machines. I want merge these scripts but I'm new on PowerCLI and it's syntax.</p>
  
  <p>I'm sharing these scripts at below:</p>
  
  <p>Non-Appliance List:</p>
  
  <pre><code>Get-VM | `
  Get-Annotation | `
  Where-Object {$_.name -eq "Appliance"} | `
  Where-Object {$_.value -eq 'No'} | `
  Export-Csv C:\Users\me\Documents\non-appliance-list.csv -NoTypeInformation -UseCulture
  </code></pre>
  
  <hr>
  
  <p>Linux List:</p>
  
  <pre><code>Get-View -Property @("Name", "Config.GuestFullName","Guest.GuestFullName") | `
  Select -Property Name, @{N="COS";E={$_.Config.GuestFullName}}, @{N="ROS";E={$_.Guest.GuestFullName}} | `
  Where-Object ({$_.ROS -like 'Centos*' -or $_.ROS -like 'Suse*' -or $_.ROS -like 'Ubuntu*'}) | `    
  Select AnnotatedEntity,Name,Value | `
  Export-Csv C:\Users\me\Documents\linux-list.csv -NoTypeInformation -UseCulture
  </code></pre>
  
  <hr>
  
  <p>Script I imagined but doesn't worked:</p>
  
  <pre><code>Get-VM | `
  Get-Annotation | `
  Where-Object {$_.name -eq "Appliance"} | `
  Where-Object {$_.value -eq 'No'} | `
  Get-View -Property @("Name", "Config.GuestFullName","Guest.GuestFullName") | `
  Select -Property Name, @{N="COS";E={$_.Config.GuestFullName}}, @{N="ROS";E={$_.Guest.GuestFullName}} | `
  Where-Object ({$_.ROS -like 'Centos*' -or $_.ROS -like 'Suse*' -or $_.ROS -like 'Ubuntu*'}) | `    
  Select AnnotatedEntity,Name,Value | `
  Export-Csv C:\Users\me\Documents\linux--list.csv -NoTypeInformation -UseCulture
  </code></pre>
  
  <hr>
  
  <p>Maybe It has been a XY-Question. If you have a better way to get Linux VMs those are not appliance, you can say me this method.</p>