Skip to content

Instantly share code, notes, and snippets.

@Ovis
Created June 30, 2019 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ovis/9d7a65289f1b12ffb37a931ef1cea8a3 to your computer and use it in GitHub Desktop.
Save Ovis/9d7a65289f1b12ffb37a931ef1cea8a3 to your computer and use it in GitHub Desktop.
$XmlinPath = "D:\TaskScheduler\Task\DogaRadi\WakeUp\"
$TaskinPath = "\DogaRadi\WakeUp\"
$tasks = Get-ChildItem "$XmlinPath\*.xml" -name
foreach ($i in $tasks)
{
schtasks /create /XML $XmlinPath$i /TN "$TaskinPath$i".Replace(".xml","")
}
$XmlinPath = "D:\TaskScheduler\Task\DogaRadi\RadioRecorder\"
$TaskinPath = "\DogaRadi\RadioRecorder\"
$tasks = Get-ChildItem "$XmlinPath\*.xml" -name
foreach ($i in $tasks)
{
schtasks /create /XML $XmlinPath$i /TN "$TaskinPath$i".Replace(".xml","")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment