-
Notifications
You must be signed in to change notification settings - Fork 619
Open
Labels
area-scheduledtasksIssues for scheduledtasks moduleIssues for scheduledtasks moduleissue-doc-bugSomething is out of date, unclear, confusing, or broken in the article. Blocks customer success.Something is out of date, unclear, confusing, or broken in the article. Blocks customer success.
Description
Example for Delay and ExecutionTimeLimit :
$TaskTrigger = New-ScheduledTaskTrigger -AtLogOn
$TaskTrigger.Delay = "PT1M"
$TaskTrigger.ExecutionTimeLimit = "PT18M"
Missing: Where is the "PT1M" format documented? I had to get this out of an exported XML.
Set the starttime to be LOCAL time instead of UTC, missing as well:
$TaskTrigger = New-ScheduledTaskTrigger -Daily -At "04:05"
$TaskTrigger.StartBoundary = [DateTime]::Parse($TaskTrigger.StartBoundary).ToLocalTime().ToString("s")
Example for "Do task until date X, AND use LOCAL TIME", missing as well:
$TaskTrigger.EndBoundary = ((Get-Date).AddDays(20).ToLocalTime()).ToString("s")
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: fe1a58d0-d63a-b010-0fcf-c9f41ed3f77a
- Version Independent ID: 84be6419-e750-a16e-70fc-85a3fb0d0569
- Content: New-ScheduledTaskTrigger (ScheduledTasks)
- Content Source: docset/winserver2022-ps/scheduledtasks/New-ScheduledTaskTrigger.md
- Product: w10
- Technology: windows
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend
Metadata
Metadata
Assignees
Labels
area-scheduledtasksIssues for scheduledtasks moduleIssues for scheduledtasks moduleissue-doc-bugSomething is out of date, unclear, confusing, or broken in the article. Blocks customer success.Something is out of date, unclear, confusing, or broken in the article. Blocks customer success.