<?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: PowerCli script with Get-View to report on VMs and specifications in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520905#M17560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is what you script is doing, you're getting all the VMs for each iteration through data/cluster.&lt;/P&gt;&lt;P&gt;To limit it to only to the VMs in a cluster, use the &lt;STRONG&gt;SearchRoot&lt;/STRONG&gt; parameter.&lt;/P&gt;&lt;P&gt;Replace the line with&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;vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Oct 2019 23:22:28 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2019-10-31T23:22:28Z</dc:date>
    <item>
      <title>PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520900#M17555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have obtained the script below from the Web and I have amended it for my purpose:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$report = @()&lt;/P&gt;&lt;P&gt;foreach ($dc in Get-Datacenter) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($cluster in Get-Cluster -Location $dc){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vms = Get-view -ViewType VirtualMachine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($vm in $vms){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info = "" | select Datacenter, Name, ToolsStatus, NumCpu, MemoryMB, guestos, @{N='IPAddr';E={[string]::Join(',',$vm.Guest.net.IPAddress)}} | sort Name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info.datacenter = $dc.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info.Name = $vm.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info.toolsstatus = $vm.guest.toolsstatus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info.NumCpu = $vm.Summary.config.NumCpu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info.MemoryMB = $vm.Summary.config.memorySizeMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $info.guestos = $vm.guest.guestfullname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $report += $info&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;$report | export-csv "\Report.csv" -NoTypeInformation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would now like to amend the script to add the Datastore that each VM is stored on but I cannot seem to pipe that information into the script.&amp;nbsp; I have found another script which gets the datastore name but I cannot figure out how to configure the script above to include it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-View -ViewType "VirtualMachine" -Property "Name", "Config.DatastoreUrl" | Select-Object -Property Name, @{N="DataStore";E={$_.Config.DatastoreUrl | %{$_.Name}}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please could you help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 10:04:22 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520900#M17555</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-10-31T10:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520901#M17556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this.&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;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Datacenter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; select Datacenter&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Name&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ToolsStatus&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; NumCpu&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; MemoryMB&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; guestos&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; IPAddress&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Datastore&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Guest.net.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Unique&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Id &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Name &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.datacenter&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Name&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.toolsstatus&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.toolsstatus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NumCpu&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.NumCpu&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.MemoryMB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.memorySizeMB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.guestos&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.guestfullname&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;export-csv&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;\Report.csv&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;NoTypeInformation&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 10:47:42 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520901#M17556</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-10-31T10:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520902#M17557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that works like a charm.&amp;nbsp; Is there any way I can now sort by Datacenter, then Name?&amp;nbsp; So the Datacenter values are sorted alphabetically and so are the VM Names under that Datacenter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 11:19:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520902#M17557</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-10-31T11:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520903#M17558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, replace the last line with&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;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Datacenter&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;Name &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Export-Csv&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;\Report.csv&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;NoTypeInformation&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 11:27:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520903#M17558</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-10-31T11:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520904#M17559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost there, but the script seems to duplicate all of the VMs against all of the Datacenters.&amp;nbsp; So for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datacenter1 contains VM-A &amp;amp; VM-B&lt;/P&gt;&lt;P&gt;Datacenter2 contains VM-C &amp;amp; VM-D&lt;/P&gt;&lt;P&gt;Datacenter3 contains VM-E &amp;amp; VM-F&lt;/P&gt;&lt;P&gt;Datacenter4 contains VM-G * VM-H&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The generated report lists all 8 VMs against all 4 Datacenters so completes with 32 VMs across 4 Datacenters instead of 8.&amp;nbsp; Is there any changes I can make so that only the required VMs get listed against the Datacenter they are in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 16:08:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520904#M17559</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-10-31T16:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520905#M17560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is what you script is doing, you're getting all the VMs for each iteration through data/cluster.&lt;/P&gt;&lt;P&gt;To limit it to only to the VMs in a cluster, use the &lt;STRONG&gt;SearchRoot&lt;/STRONG&gt; parameter.&lt;/P&gt;&lt;P&gt;Replace the line with&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;vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 23:22:28 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520905#M17560</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-10-31T23:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520906#M17561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much for your help.&amp;nbsp; Last one is that I am trying to get the Datastore diskspace used by VM so I have tried adding the line below but I guess it it not formatted correctly because when I try to re-format the command it either does not work or it causes script errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$info.DatastoreUsed = (Get-HardDisk -VM $vm.name -Property Name | Select-Object CapacityGB).Name -join '|'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:06:47 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520906#M17561</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-11-01T12:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520907#M17562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could get that information directly from the VirtualMachine object, no need to do a Get-HardDisk.&lt;/P&gt;&lt;P&gt;Something like this&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;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Datacenter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; select Datacenter&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Name&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ToolsStatus&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; NumCpu&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; MemoryMB&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; guestos&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; IPAddress&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Datastore&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; DatastoreUsedGB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Guest.net.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Unique&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Id &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Name &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.DatastoreUsedGB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;math&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]&lt;/SPAN&gt;::Round&lt;SPAN style="color: #000000;"&gt;(($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Storage.PerDatastoreUsage.Committed&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Measure-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Sum&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Sum&lt;SPAN style="color: #a9a9a9;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;GB&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.datacenter&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Name&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.toolsstatus&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.toolsstatus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NumCpu&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.NumCpu&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.MemoryMB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.memorySizeMB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.guestos&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.guestfullname&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;export-csv&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;\Report.csv&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;NoTypeInformation&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:33:56 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520907#M17562</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-11-01T12:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520908#M17563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, exactly what I was looking for.&amp;nbsp; The only change I have made is to convert the MemoryMb to MemoryGB and to change the line below as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: proxima-nova, Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #ff4500;"&gt;info.MemoryGB&lt;/SPAN&gt;&lt;SPAN style="color: #666666; font-family: proxima-nova, Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #666666; font-family: proxima-nova, Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #ff4500;"&gt;vm.Summary.config.memorySizeMB / 1024&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #303030;"&gt;Thanks very much for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:46:18 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520908#M17563</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-11-01T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520909#M17564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for the additional ask, but is there a way I can calculate the total number of VMs per Datacenter/Cluster?&amp;nbsp; I have amended the script so it reports the total number of VMs in the vCenter instance by adding $total_vms = (Get-VM).count and I also found the command below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get-cluster | select @{n="cluster";e={$_.name}}, @{n="hosts";e={($_ | get-vmhost).count}}, @{n="vms";e={($_ | get-vm).count}} | sort cluster | ft -auto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which works if I run it manually but if I try to integrate it into the script by assigning it to a variable, the output is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Microsoft.PowerShell.Commands.Internal.Format.GroupEndData Microsoft.PowerShell.Commands.Internal.Format.FormatEndData&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically want it to output the results at the beginning of the output file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 11:46:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520909#M17564</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-11-05T11:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520910#M17565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Export-Csv cmdlet looks at the 1st row if data to determine which columns will appear in the CSV.&lt;/P&gt;&lt;P&gt;So if you rows are not the same, the CSV file only contain part of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could repeat the information on each row, thus making sure each row has the same columns.&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;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Datacenter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dcVm&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; select Datacenter&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Name&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ToolsStatus&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; NumCpu&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; MemoryMB&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; guestos&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; IPAddress&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Datastore&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; DatastoreUsedGB&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;NrVMperDC&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;NrVMperCluster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Guest.net.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Unique&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Id &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Name &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.DatastoreUsedGB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;math&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]&lt;/SPAN&gt;::Round&lt;SPAN style="color: #000000;"&gt;(($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Storage.PerDatastoreUsage.Committed&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Measure-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Sum&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Sum&lt;SPAN style="color: #a9a9a9;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;GB&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.datacenter&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Name&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.toolsstatus&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.toolsstatus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NumCpu&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.NumCpu&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.MemoryMB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.memorySizeMB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.guestos&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.guestfullname&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NrVMperDC&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dcVm.Count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NrVmperCluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms.Count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;export-csv&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;\Report.csv&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;NoTypeInformation&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 14:51:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520910#M17565</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-11-05T14:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520911#M17566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That appears to display the figures in the table against each VM rather than separately.&amp;nbsp; What I was looking for was something like the following although the ClusterHosts and ClusterVMs fields do not display the details correctly (the ClusterName is reported correctly for all cluster instances).&amp;nbsp; The html configuration is something I am working on for display purposes so I have defined $html (and $export_html &amp;amp; $Dateformat) separately&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$total_vms = (Get-VM).count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$reportcluster = @()&lt;/P&gt;&lt;P&gt;foreach ($dc in Get-Datacenter) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($cluster in Get-Cluster -Location $dc){&lt;/P&gt;&lt;P&gt;$infocluster = "" | select ClusterName, ClusterHosts, ClusterVMs&lt;/P&gt;&lt;P&gt;$infocluster.ClusterName = $cluster&lt;/P&gt;&lt;P&gt;$infocluster.ClusterHosts = (get-cluster | select @{n="hosts";e={($_ | get-vmhost).count}}) -join '|'&lt;/P&gt;&lt;P&gt;$infocluster.ClusterVMs =&amp;nbsp; (get-cluster | select @{n="vms";e={($_ | get-vm).count}}) -join '|'&lt;/P&gt;&lt;P&gt;$reportcluster += $infocluster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$reportcluster | Sort-Object -Property ClusterName | ConvertTo-Html -Head $html -Body "&amp;lt;h1&amp;gt; Report run on: $Dateformat&amp;lt;/h1&amp;gt;&amp;lt;h2&amp;gt;Total number of VMs across all Data Centres/Clusters: $total_vms&amp;lt;/h2&amp;gt;" | Out-File $export_html&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 13:17:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520911#M17566</guid>
      <dc:creator>AdamUK</dc:creator>
      <dc:date>2019-11-06T13:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520912#M17567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this&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;total_vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-VM&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.count &lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;reportcluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Datacenter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;infocluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; select ClusterName&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ClusterHosts&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ClusterVMs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;infocluster.ClusterName&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;infocluster.ClusterHosts&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-VMHost&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;infocluster.ClusterVMs&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;reportcluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;infocluster&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;reportcluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property ClusterName &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;ConvertTo-Html&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Head &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;html&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Body &lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;&amp;lt;h1&amp;gt; Report run on: &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;Dateformat&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;&amp;lt;/h1&amp;gt;&amp;lt;h2&amp;gt;Total number of VMs across all Data Centres/Clusters: &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;total_vms&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;&amp;lt;/h2&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Out-File&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;export_html&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:09:22 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520912#M17567</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-11-06T16:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520913#M17568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;how to get the same report for signle vm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 15:49:20 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520913#M17568</guid>
      <dc:creator>cnuvaasan</dc:creator>
      <dc:date>2019-11-28T15:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520914#M17569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which of the many scripts in this thread are you referring to?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 15:54:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520914#M17569</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-11-28T15:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520915#M17570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #ff4500;"&gt;report&lt;/SPAN&gt;&lt;SPAN style="color: #666666; font-family: proxima-nova, Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #666666; font-family: proxima-nova, Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="font-family: proxima-nova, Arial, sans-serif; color: #000000;"&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;dc&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Get-Datacenter&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;dcVm&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;dc.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;cluster&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;dc&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vms&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;cluster.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vms&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;|&lt;/SPAN&gt; select Datacenter&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Name&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ToolsStatus&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; NumCpu&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; MemoryMB&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; guestos&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; IPAddress&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Datastore&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt; DatastoreUsedGB&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt;NrVMperDC&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt;NrVMperCluster&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.IPAddress&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.Guest.net.IPAddress&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;{$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;}&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Unique&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.Datastore&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Id &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.Datastore&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;)&lt;/SPAN&gt;.Name &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.DatastoreUsedGB&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;math&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;]&lt;/SPAN&gt;::Round&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;(($&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.Storage.PerDatastoreUsage.Committed&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;Measure-Object&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Sum&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;)&lt;/SPAN&gt;.Sum&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #00008b;"&gt;GB&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.datacenter&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;dc.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.Name&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.toolsstatus&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.guest.toolsstatus&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.NumCpu&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.Summary.config.NumCpu&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.MemoryMB&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.Summary.config.memorySizeMB&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.guestos&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vm.guest.guestfullname&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.NrVMperDC&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;dcVm.Count&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info.NrVmperCluster&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;vms.Count&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;info&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #0000ff;"&gt;export-csv&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #8b0000;"&gt;\Report.csv&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: inherit !important; font-family: inherit; color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;the same script but i need to get a single vm&amp;nbsp; report&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 18:35:41 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520915#M17570</guid>
      <dc:creator>cnuvaasan</dc:creator>
      <dc:date>2019-11-28T18:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520916#M17571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the Filter parameter on the Get-View cmdlet.&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;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vmName&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;MyVM&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Datacenter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dcVm&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc.ExtensionData.MoRef&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Location &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Get-view&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;ViewType VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;SearchRoot &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;cluster.ExtensionData.MoRef&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Filter &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vmName&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;foreach&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;in&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; select Datacenter&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; Name&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; ToolsStatus&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; NumCpu&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; MemoryMB&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; guestos&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; IPAddress&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Datastore&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt; DatastoreUsedGB&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;NrVMperDC&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;NrVMperCluster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Guest.net.IPAddress&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sort-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Unique&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-View&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Id &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Property Name&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Name &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.DatastoreUsedGB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;math&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]&lt;/SPAN&gt;::Round&lt;SPAN style="color: #000000;"&gt;(($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Storage.PerDatastoreUsage.Committed&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Measure-Object&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Sum&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Sum&lt;SPAN style="color: #a9a9a9;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;GB&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.datacenter&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dc.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.Name&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.toolsstatus&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.toolsstatus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NumCpu&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.NumCpu&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.MemoryMB&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.Summary.config.memorySizeMB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.guestos&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vm.guest.guestfullname&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NrVMperDC&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;dcVm.Count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info.NrVmperCluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;vms.Count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;info&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;report&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;export-csv&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;\Report.csv&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>Thu, 28 Nov 2019 18:51:45 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/520916#M17571</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2019-11-28T18:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/2836474#M100448</link>
      <description>&lt;P&gt;It is possible to list each vm cluster on this report?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:03:27 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/2836474#M100448</guid>
      <dc:creator>GustavoDXC</dc:creator>
      <dc:date>2021-03-17T16:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCli script with Get-View to report on VMs and specifications</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/2836482#M100451</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$report = @()
$vmName = 'MyVM'

foreach ($dc in Get-Datacenter) {
    $dcVm = Get-View -ViewType VirtualMachine -Property Name -SearchRoot $dc.ExtensionData.MoRef
    foreach ($cluster in Get-Cluster -Location $dc){
      $vms = Get-view -ViewType VirtualMachine -SearchRoot $cluster.ExtensionData.MoRef -Filter @{Name="^$vmName$"}
      foreach ($vm in $vms){
        $info = "" | select Datacenter, Cluster, Name, ToolsStatus, NumCpu, MemoryMB, guestos, IPAddress,
            Datastore, DatastoreUsedGB,NrVMperDC,NrVMperCluster
        $info.Datacenter = $dc.Name
        $info.Cluster = $cluster.Name
        $info.IPAddress = ($vm.Guest.net.IPAddress | where{$_} | Sort-Object -Unique) -join '|'
        $info.Datastore = (Get-View -Id $vm.Datastore -Property Name).Name -join '|'
        $info.DatastoreUsedGB = [math]::Round(($vm.Storage.PerDatastoreUsage.Committed | Measure-Object -Sum).Sum/1GB,1)
        $info.datacenter = $dc.name
        $info.Name = $vm.name
        $info.toolsstatus = $vm.guest.toolsstatus
        $info.NumCpu = $vm.Summary.config.NumCpu
        $info.MemoryMB = $vm.Summary.config.memorySizeMB
        $info.guestos = $vm.guest.guestfullname
        $info.NrVMperDC = $dcVm.Count
        $info.NrVmperCluster = $vms.Count
        $report += $info
      }
    }
}

$report | export-csv "\Report.csv"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:33:19 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCli-script-with-Get-View-to-report-on-VMs-and/m-p/2836482#M100451</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2021-03-17T16:33:19Z</dc:date>
    </item>
  </channel>
</rss>

