<?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: select parameters are wrong - looking for server - reports servername and harddisk in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748701#M96796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To return the name of the virtual machine name associated with the virtual machine hard disk from the Get-HardDisk cmdlet output you will need to select the Parent property value of the output. For Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="_jivemacro_uid_14920655046851007 jive_macro_code jive_text_macro" data-renderedposition="68_8_1231_16" jivemacro_uid="_14920655046851007"&gt;&lt;P&gt;Get-VM cbslnpcs1 | Get-HardDisk | Select Parent, CapacityGB&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Apr 2017 06:39:51 GMT</pubDate>
    <dc:creator>deang1609</dc:creator>
    <dc:date>2017-04-13T06:39:51Z</dc:date>
    <item>
      <title>select parameters are wrong - looking for server - reports servername and harddisk</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748699#M96794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;get-vm cbslnpcs1 | get-harddisk | select VM, CapacityGB&lt;/P&gt;&lt;P&gt;VM CapacityGB&lt;BR /&gt;-- ----------&lt;BR /&gt;??&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&lt;BR /&gt;??&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&lt;BR /&gt;??&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't i see the VM server Name? is it because Select VM is in third pipe and the query is harddisk and harddisk does not have a vm attribute associated with it? How do i get the third section (Select VM) to get-VM first section to report VM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 17:39:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748699#M96794</guid>
      <dc:creator>cmjellis</dc:creator>
      <dc:date>2017-04-12T17:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: select parameters are wrong - looking for server - reports servername and harddisk</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748700#M96795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right. The output of &lt;SPAN style="font-family: 'courier new', courier;"&gt;Get-Harddisk&lt;/SPAN&gt; does not have a &lt;SPAN style="font-family: 'courier new', courier;"&gt;VM&lt;/SPAN&gt; property. In this case, you can use the &lt;SPAN style="font-family: 'courier new', courier;"&gt;Parent&lt;/SPAN&gt; property that contains the VM. For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Get-VM | Get-HardDisk | Select Parent,CapacityGB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A more general solution is to use the &lt;SPAN style="font-family: 'courier new', courier;"&gt;-PipelineVariable&lt;/SPAN&gt; parameter with the &lt;SPAN style="font-family: 'courier new', courier;"&gt;Get-VM&lt;/SPAN&gt; cmdlet to save the current VM in a variable. Then you can use a calculated property to display the VM name, as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Get-VM -PipelineVariable VM | Get-HardDisk | Select @{Name='VM';Expression={$VM.Name}},CapacityGB&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 06:37:27 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748700#M96795</guid>
      <dc:creator>RvdNieuwendijk</dc:creator>
      <dc:date>2017-04-13T06:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: select parameters are wrong - looking for server - reports servername and harddisk</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748701#M96796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To return the name of the virtual machine name associated with the virtual machine hard disk from the Get-HardDisk cmdlet output you will need to select the Parent property value of the output. For Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="_jivemacro_uid_14920655046851007 jive_macro_code jive_text_macro" data-renderedposition="68_8_1231_16" jivemacro_uid="_14920655046851007"&gt;&lt;P&gt;Get-VM cbslnpcs1 | Get-HardDisk | Select Parent, CapacityGB&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 06:39:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/select-parameters-are-wrong-looking-for-server-reports/m-p/2748701#M96796</guid>
      <dc:creator>deang1609</dc:creator>
      <dc:date>2017-04-13T06:39:51Z</dc:date>
    </item>
  </channel>
</rss>

