Get-View speed increase
This is something that I found on the VMware Communites a while back, it has to do with how long it takes to retreive the "View" of a virtual machine using PowerShell and PowerCLI.
When you do this:
$VM = Get-VM myvm | Get-ViewIt takes quite a while to run because it is first populating the "VM" object with a bunch of stuff that in the end we don't care about. By changing the code around we can tell PowerShell what we actually want to do in the end and save a *ton* of time (one script I modified literaly saved hours of runtime doing it this way).
The better way of doing it is this:
$VM = Get-VM -ViewType VirtualMachine -Filter @{"Name"="myvm"}For more information on why this is awesome, check out this post on get-admin.com:
PowerCLI SpeedBoost: Advanced functionality hidden within Get-View