Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 199144

Re: Getting Notes field from PowerCli

$
0
0

Try like this

 

$VmInfo=ForEach ($Datacenterin (Get-Datacenter)) {

     ForEach ($VMin ($Datacenter|Get-VM|where {$_.powerstate -match"on"} |get-vmguest)) {  

        $vm|Select @{N="VM_NAME#";E={$vm.Hostname}},

            @{N="VM_CPU_Core#";E={$vm.NumCPU}},

            @{N="VM_IP#";E={$vm.IPAddress}},

            @{N="VM_OS";E={$vm.OSFullName}},

            @{N="VM_DC";E={$Datacenter.name}},

            @{N="VM_NOTES";E={$Vm.VM.Notes}}

     }

}

 

$VmInfo|Export-Csv-NoTypeInformation-UseCulture-Path"d:\temp\report.csv"

 


Viewing all articles
Browse latest Browse all 199144

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>