PowerCLI

 View Only
  • 1.  get-vm first 10 vms and vmotion

    Posted Oct 24, 2015 10:56 PM

    how to i get a list of the first 10 vms from a host and vmotion them?



  • 2.  RE: get-vm first 10 vms and vmotion

    Posted Oct 25, 2015 12:48 PM

    What type of vmotion and what are your requirements around such?

    This construct will get the first 10 Powered on VMs *by name* from a host.  Perhaps it will help.

    $hostname = "your-esxi-host"

    Get-VMHost $hostname | Get-VM | Where-Object {$_.PowerState -eq "PoweredOn"} | Sort-Object Name | Select -First 10