<?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 to svMotion VM's based on a list of VM's in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412133#M7946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldnt be an issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you're saying I would add the VM's I want to migrate to the "vmname" column, then the DS that I want it to go to in the "DESTDS"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have 30-40 VMs in the csv file.....Is there a way to have say, 3 or 4 run at a time and queue up the ones behind it? Almost like a job.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2014 19:39:50 GMT</pubDate>
    <dc:creator>justinsmith</dc:creator>
    <dc:date>2014-10-22T19:39:50Z</dc:date>
    <item>
      <title>PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412131#M7944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im looking to svMotion VM's based on a spreadsheet or txt file (either will work for me) from one datastore to another. I've found simple ones that do it, but nothing that will import a csv file or txt file and svmotion those VM's. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 18:38:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412131#M7944</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T18:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412132#M7945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to put your destination datastore in the CSV?&amp;nbsp; If so, you'd have something like this:&lt;/P&gt;&lt;P&gt;csv file format:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="289"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="134"&gt;vmname&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="155"&gt;destDS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;myVM1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;datastore1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;myVM2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;datastore2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;myVM3&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;datastore3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$filepath = "D:\PathtoCSV\filename.csv&lt;/P&gt;&lt;P&gt;$csvobj = import-csv $filepath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach ($row in $csvobj) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj = get-vm $row.vmname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ds = get-datastore $row.destds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj | move-vm -datastore $ds -confirm:$false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not very eloquent, but should get the job done.&amp;nbsp; Let me know how it works out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 19:32:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412132#M7945</guid>
      <dc:creator>brentcochran1</dc:creator>
      <dc:date>2014-10-22T19:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412133#M7946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldnt be an issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you're saying I would add the VM's I want to migrate to the "vmname" column, then the DS that I want it to go to in the "DESTDS"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have 30-40 VMs in the csv file.....Is there a way to have say, 3 or 4 run at a time and queue up the ones behind it? Almost like a job.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 19:39:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412133#M7946</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T19:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412134#M7947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might do it like this:&lt;/P&gt;&lt;P&gt;$VMsToMove = Get-Datastore "NameofDataStoreContainingTargetVMs" | Get-VM&lt;/P&gt;&lt;P&gt;$TargetDatastore = GetDatastore NameofTargetDatastore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Foreach ($VM in $VMsToMove)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;Move-VM -VM $VM -Destination $TargetDatastore -Confirm:$False&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless of course you have a particular need to make a CSV to import from.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 19:46:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412134#M7947</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-22T19:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412135#M7948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or, if it's an option, make a datastore cluster and place the datastore you want to move from into maintenance mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 19:48:12 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412135#M7948</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-22T19:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412136#M7949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I want to queue up basically 30-40 VM's so having them in a list would work better, since I dont want to evacuate an entire DS. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 19:49:18 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412136#M7949</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T19:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412137#M7950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not an option, we have some VM's that have RDM's attached and I want to svMotion those VM's separately. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 19:50:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412137#M7950</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T19:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412138#M7951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So then you can use Brent's suggestion.&amp;nbsp; Just add the -runasync switch to make it run like a queued job.&amp;nbsp; Like so:&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$filepath = "D:\PathtoCSV\filename.csv&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$csvobj = import-csv $filepath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;foreach ($row in $csvobj) {&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj = get-vm $row.vmname&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ds = get-datastore $row.destds&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj | move-vm -datastore $ds -runasync -confirm:$false &lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:02:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412138#M7951</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-22T20:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412139#M7952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does that only do 1 at a time? is there a value I can set against the -runasync command to run say 3 or 4 at the same time and have it kick off the next in the list when one's done? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:08:33 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412139#M7952</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T20:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412140#M7953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The -runasync switch should just send the command and not monitor it's progress allowing the foreach loop to keep going even if the initial storage vmotion didn't start.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:15:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412140#M7953</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-22T20:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412141#M7954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to queue up 3 or 4 at a time based on a list of 30 or 40? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:29:30 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412141#M7954</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T20:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412142#M7955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could if you wanted to, but vCenter will normally throttle itself.&amp;nbsp; So you could have all 50 queued up and only a subset of those would actually be active jobs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One method would be to introduce an arbitrary count and sleep method.&amp;nbsp; Or another more accurate, but would require a bit more coding would be to look @ the tasks and only start another job if the active task count is less than 4 or 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the first method as an example:&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$filepath = "D:\PathtoCSV\filename.csv&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$csvobj = import-csv $filepath&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$Count = 4&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;foreach ($row in $csvobj) {&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Count --&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj = get-vm $row.vmname&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ds = get-datastore $row.destds&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj | move-vm -datastore $ds -runasync -confirm:$false&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ($Count -lt 0){Sleep 1500; $Count = 4} &lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:54:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412142#M7955</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-22T20:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412143#M7956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Id feel more comfortable with a script throttling it as apposed to what vCenter can handle. We have almost 4k VM's running and I wouldnt want it to try 30 because it thinks it can and then choke. Im ok with it doing 3-4 at a time though. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:57:04 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412143#M7956</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T20:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412144#M7957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 3500 VM's in my environment.&amp;nbsp; they are just job queues.&amp;nbsp; I migrated 60 VM's from one datastore to another in the middle of the day using Storage DRS.&amp;nbsp; It did exactly that, moved I think 8 at a time, while the rest of the jobs were just queued.&amp;nbsp; The next one would continue when one finished.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 21:00:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412144#M7957</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-22T21:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412145#M7958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're not running storage DRS, but Im familiar with both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like I said, I'd feel more comfortable scheduling or queuing up a set number before running it. Thanks for the helpful info though. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 21:06:38 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412145#M7958</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T21:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412146#M7959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at &lt;A href="http://poshcode.org/4880"&gt;VMware sVmotion throttle&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 21:32:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412146#M7959</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2014-10-22T21:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412147#M7960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That might do it LucD, I just didnt want to throttle vCenter's resources with 40+ svMotions and not be able to do any other work until those are done. How would I integrate this code with the one below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$filepath = "D:\PathtoCSV\filename.csv&lt;/P&gt;&lt;P&gt;$csvobj = import-csv $filepath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach ($row in $csvobj) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj = get-vm $row.vmname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ds = get-datastore $row.destds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj | move-vm -datastore $ds -confirm:$false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 21:52:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412147#M7960</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-22T21:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412148#M7961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&amp;lt;#&lt;/P&gt;&lt;P&gt;&amp;nbsp; .SYNOPSIS&lt;/P&gt;&lt;P&gt;&amp;nbsp; Will enter a wait/loop if there are running vMotion or svMotion tasks.&lt;/P&gt;&lt;P&gt;&amp;nbsp; .DESCRIPTION&lt;/P&gt;&lt;P&gt;&amp;nbsp; Checks the tasks and counts the number running vMotion or svMotion tasks.&lt;/P&gt;&lt;P&gt;&amp;nbsp; If the number of active tasks is greater than the specified limit&lt;/P&gt;&lt;P&gt;&amp;nbsp; then the function sleeps and checks again. The intended is as a throttle&lt;/P&gt;&lt;P&gt;&amp;nbsp; in large (s)vMotion loops to prevent overloading the environment.&amp;nbsp; Is&lt;/P&gt;&lt;P&gt;&amp;nbsp; especially useful in throttling a script while an unrelated event happens, &lt;/P&gt;&lt;P&gt;&amp;nbsp; such as putting a host or datastore into maintenance mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp; .PARAMETER vMotionLimit&lt;/P&gt;&lt;P&gt;&amp;nbsp; The active tasks to test for.&amp;nbsp; If the number of active tasks is less than&lt;/P&gt;&lt;P&gt;&amp;nbsp; this the function will exit.&amp;nbsp; The default is 1, and must be an integer.&lt;/P&gt;&lt;P&gt;&amp;nbsp; .PARAMETER DelayMinutes&lt;/P&gt;&lt;P&gt;&amp;nbsp; How long to wait before checking the active tasks again.&amp;nbsp; The default &lt;/P&gt;&lt;P&gt;&amp;nbsp; is 1, and must be an integer.&lt;/P&gt;&lt;P&gt;&amp;nbsp; .EXAMPLE&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wait-mTaskvMotions -Verbose&lt;/P&gt;&lt;P&gt;&amp;nbsp; .EXAMPLE&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wait-mTaskvMotions -vMotionLimit 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; .EXAMPLE&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wait-mTaskvMotions -vMotionLimit 2 -DelayMinutes 3 -Verbose&lt;/P&gt;&lt;P&gt;&amp;nbsp; .NOTES&lt;/P&gt;&lt;P&gt;&amp;nbsp; Using -Verbose will output standard script started and finished messages, &lt;/P&gt;&lt;P&gt;&amp;nbsp; and how long the function will sleep before it checks the active tasks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp; .LINK&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mongit201.be.monster.com/chrism/virtech/blob/master/Repo/Wait-mTaskvMotions.ps1"&gt;http://mongit201.be.monster.com/chrism/virtech/blob/master/Repo/Wait-mTaskvMotions.ps1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;#&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function Wait-mTaskvMotions {&lt;/P&gt;&lt;P&gt;[CmdletBinding()]&lt;/P&gt;&lt;P&gt;Param(&lt;/P&gt;&lt;P&gt;&amp;nbsp; [int] $vMotionLimit=1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; [int] $DelayMinutes=5&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$NumvMotionTasks = (Get-Task | ? { ($_.PercentComplete -ne 100) -and ( ($_.Description -like '*DRS*') -or ($_.Description -like '*vMotion*') )} | Measure-Object).Count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While ( $NumvMotionTasks -ge $vMotionLimit ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Write-Verbose "$(Get-Date)- Waiting $($DelayMinutes) minute(s) before checking again."&lt;/P&gt;&lt;P&gt;&amp;nbsp; Start-Sleep ($DelayMinutes * 60)&lt;/P&gt;&lt;P&gt;&amp;nbsp; $NumvMotionTasks = (Get-Task | ? { ($_.PercentComplete -ne 100) -and ( ($_.Description -like '*DRS*') -or ($_.Description -like '*vMotion*') )} | Measure-Object).Count&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Write-Verbose "$(Get-Date)- Proceeding."&lt;/P&gt;&lt;P&gt;} # end function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$filepath = "D:\PathtoCSV\filename.csv&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;$csvobj = import-csv $filepath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;foreach ($row in $csvobj) {&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj = get-vm $row.vmname&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ds = get-datastore $row.destds&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $vmobj | move-vm -datastore $ds -confirm:$false -runasync&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wait-mTaskvMotions -vMotionLimit 4 # This will keep going through the foreach loop until 4 tasks are registered (vMotion or Storage vMotion), waits 5 minutes between checks.&amp;nbsp; Will only continue to process loop when vMotion tasks are less than 4.&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 01:50:15 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412148#M7961</guid>
      <dc:creator>Zsoldier</dc:creator>
      <dc:date>2014-10-23T01:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412149#M7962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what Im missing, but when I run it, it just opens the .csv file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 18:03:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412149#M7962</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-23T18:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: PowerCLI script to svMotion VM's based on a list of VM's</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412150#M7963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually added connect-viserver VSERVERNAME to the script and it worked instead of doing it from the powercli prompt first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only downside is, its migrating all the VM's and not queuing any up. I was hoping it would just grab the first 4 in the csv file, process them, and when one is done it moves on to the next one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/55719i7536B0387BFB1270/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 18:44:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-svMotion-VM-s-based-on-a-list-of-VM-s/m-p/412150#M7963</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2014-10-23T18:44:35Z</dc:date>
    </item>
  </channel>
</rss>

