# Import multiple scheduled tasks from XML

**URL:** <https://forums.powershell.org/t/import-multiple-scheduled-tasks-from-xml/23232>\
**Category:** PowerShell Help\
**Created:** [November 29, 2023, 10:41am UTC](https://forums.powershell.org/t/import-multiple-scheduled-tasks-from-xml/23232 "2023-11-29T10:41:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 29, 2023, 11:33am UTC](https://forums.powershell.org/t/import-multiple-scheduled-tasks-from-xml/23232/2 "2023-11-29T11:33:32Z")

</div>

as21,  
Welcome to the forum. 👋🏼

I have separated your post from the topic …

> [@Unable to manually run scheduled task after server upgrade from 2012 to 2019](https://forums.powershell.org/t/unable-to-manually-run-scheduled-task-after-server-upgrade-from-2012-to-2019/22071):
>
> In Windows 2012 (myServer1), I have a scheduled taks (myTask) running as myDomain\user1. I can manually run it any time in addition it runs as scheduled. After myServer1 was upgraded directly to 2019, myTask still runs successfully as scheduled, but when I run it manually, it failed with error message: The user account does not have permission to run this task. I tried the following command to assign permission to user1 $taskPath = "" $taskName = “myTask” $principal = New-ScheduledTaskPrin…

Please do not hijack threads from others. If you have a similar or follow up question you can create a new question for yourself and link the according thread as needed.

As for your question:

> [@as21](#):
>
> Any idea?

How about using a loop? 🤷🏼‍♂️

---

_[View the full topic](https://forums.powershell.org/t/import-multiple-scheduled-tasks-from-xml/23232)._
