# Need help building task from list

**URL:** <https://forums.powershell.org/t/need-help-building-task-from-list/19725>\
**Category:** PowerShell Help\
**Created:** [June 27, 2022, 2:33pm UTC](https://forums.powershell.org/t/need-help-building-task-from-list/19725 "2022-06-27T14:33:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hudzon](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@hudzon](https://forums.powershell.org/u/hudzon)\
**Post date:** [June 27, 2022, 2:33pm UTC](https://forums.powershell.org/t/need-help-building-task-from-list/19725/1 "2022-06-27T14:33:21Z")

</div>

I have a list of 200,000+ objects  
imported as a variable or hashtable whatever that part does not mater much.  
I can convert the import to whatever makes most sense.

I would like to create a job for each 10,000 objects until the end of the list.

something like foreach 10,000 of $list  
start-job -name job1 {scriptblock}

then next job  
start-job -name job2 {scriptblock}

and so on

until end of list.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 27, 2022, 5:26pm UTC](https://forums.powershell.org/t/need-help-building-task-from-list/19725/2 "2022-06-27T17:26:51Z")

</div>

Hmmm … assumed your question actually is “_How to split an array into multiple smaller arrays?_” … I used this sentence to search for and got some pretty neat answers. I’d like to encourage you to do it using your favorite internet search engine. I’m sure you will find at least enough examples to get you started. 👍🏽 🤟🏽 🙂

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:17pm UTC](https://forums.powershell.org/t/need-help-building-task-from-list/19725/3 "2024-05-16T20:17:49Z")

</div>

Closed on May 16, 2024, 8:17pm UTC


