Hi guys,
i tried to find an Answer why is slower then default query.
may anyone have an Idea why get-view is that slow in comparison to get-vm
about 4021 vms.
Measure-Command {get-vm}
Days : 0
Hours : 0
Minutes : 0
Seconds : 1
Milliseconds : 982
Ticks : 19822577
TotalDays : 2.29427974537037E-05
TotalHours : 0.000550627138888889
TotalMinutes : 0.0330376283333333
TotalSeconds : 1.9822577
TotalMilliseconds : 1982.2577
Measure-Command {Get-View -viewtype VirtualMachine}
Days : 0
Hours : 0
Minutes : 0
Seconds : 53
Milliseconds : 3
Ticks : 530030273
TotalDays : 0.00061346096412037
TotalHours : 0.0147230631388889
TotalMinutes : 0.883383788333333
TotalSeconds : 53.0030273
TotalMilliseconds : 53003.0273
$gvProps = "Name","config.hardware.numcpu","summary.quickstats.OverallCpuUsage","summary.runtime.powerState"
Measure-Command {Get-View -viewtype VirtualMachine -Property $Props}
Days : 0
Hours : 0
Minutes : 0
Seconds : 3
Milliseconds : 548
Ticks : 35483428
TotalDays : 4.10687824074074E-05
TotalHours : 0.000985650777777778
TotalMinutes : 0.0591390466666667
TotalSeconds : 3.5483428
TotalMilliseconds : 3548.3428
Get-View -viewtype VirtualMachine -Property $Props -Filter @{"summary.runtime.powerState"="PoweredOn"}
Days : 0
Hours : 0
Minutes : 0
Seconds : 4
Milliseconds : 332
Ticks : 43328185
TotalDays : 5.01483622685185E-05
TotalHours : 0.00120356069444444
TotalMinutes : 0.0722136416666667
TotalSeconds : 4.3328185
TotalMilliseconds : 4332.8185
thx
Max