HelpCache/PSScheduledJobPrxy.psm1-help.xml

<?xml version = "1.0" encoding = "utf-8" ?>
 
<helpItems schema="maml">
 
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-ScheduledTaskTrigger</command:name><maml:description><maml:para>Creates a scheduled task trigger object.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>ScheduledTaskTrigger</command:noun><dev:version /></command:details><maml:description><maml:para>The New-ScheduledTaskTrigger cmdlet creates and returns a new scheduled task trigger object. </maml:para><maml:para>You can use a time-based trigger or an event-based trigger to start a task. Time-based triggers include starting a task at a specific time or starting a task multiple times on a daily or weekly schedule. Event-based triggers include starting a task when the system starts up or when a user logs on to the computer. Each task can contain one or more triggers, which means there are many ways that you can start a task. If a task has multiple triggers, Task Scheduler starts the task when any of the triggers occur.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-ScheduledTaskTrigger</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Once</maml:name><maml:description><maml:para>Indicates that a trigger starts a task once at a time specified in the At parameter.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RandomDelay</maml:name><maml:description><maml:para>Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RepetitionDuration</maml:name><maml:description><maml:para>Specifies how long the repetition pattern repeats after the task starts.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RepetitionInterval</maml:name><maml:description><maml:para>Specifies an amount of time between each restart of the task. The task will run, wait for the time interval specified, and then run again. This cycle continues for the time that you specify for the RepetitionDuration parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>At</maml:name><maml:description><maml:para>Specifies a date and time to trigger the task. This paramater is valid for calendar-based triggers (Once, Daily, Weekly).</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-ScheduledTaskTrigger</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Weekly</maml:name><maml:description><maml:para>Indicates that the trigger starts a task on a recurring weekly schedule.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RandomDelay</maml:name><maml:description><maml:para>Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>WeeksInterval</maml:name><maml:description><maml:para>Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>At</maml:name><maml:description><maml:para>Specifies a date and time to trigger the task. This paramater is valid for calendar-based triggers (Once, Daily, Weekly).</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DaysOfWeek</maml:name><maml:description><maml:para>Specifies an array of the days of the week on which Task Scheduler runs the task.</maml:para></maml:description><command:parameterValueGroup><command:parameterValue required="true" variableLength="true">Sunday</command:parameterValue><command:parameterValue required="true" variableLength="true">Monday</command:parameterValue><command:parameterValue required="true" variableLength="true">Tuesday</command:parameterValue><command:parameterValue required="true" variableLength="true">Wednesday</command:parameterValue><command:parameterValue required="true" variableLength="true">Thursday</command:parameterValue><command:parameterValue required="true" variableLength="true">Friday</command:parameterValue><command:parameterValue required="true" variableLength="true">Saturday</command:parameterValue></command:parameterValueGroup></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-ScheduledTaskTrigger</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Daily</maml:name><maml:description><maml:para>Indicates that a trigger starts a task on a recurring daily schedule.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DaysInterval</maml:name><maml:description><maml:para>Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RandomDelay</maml:name><maml:description><maml:para>Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>At</maml:name><maml:description><maml:para>Specifies a date and time to trigger the task. This paramater is valid for calendar-based triggers (Once, Daily, Weekly).</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-ScheduledTaskTrigger</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>AtLogOn</maml:name><maml:description><maml:para>Indicates that a trigger starts a task when a user logs on.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RandomDelay</maml:name><maml:description><maml:para>Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>User</maml:name><maml:description><maml:para>Specifies the identifier of the user for a trigger that starts a task when a user logs on.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-ScheduledTaskTrigger</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>AtStartup</maml:name><maml:description><maml:para>Indicates that a trigger starts a task when the system is started.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RandomDelay</maml:name><maml:description><maml:para>Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>At</maml:name><maml:description><maml:para>Specifies a date and time to trigger the task. This paramater is valid for calendar-based triggers (Once, Daily, Weekly).</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue><dev:type><maml:name>DateTime</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>AtLogOn</maml:name><maml:description><maml:para>Indicates that a trigger starts a task when a user logs on.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>AtStartup</maml:name><maml:description><maml:para>Indicates that a trigger starts a task when the system is started.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Daily</maml:name><maml:description><maml:para>Indicates that a trigger starts a task on a recurring daily schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DaysInterval</maml:name><maml:description><maml:para>Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DaysOfWeek</maml:name><maml:description><maml:para>Specifies an array of the days of the week on which Task Scheduler runs the task.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">DayOfWeek[]</command:parameterValue><dev:type><maml:name>DayOfWeek[]</maml:name><maml:uri /></dev:type><dev:defaultValue>{ DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday, DayOfWeek.Sunday }</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Once</maml:name><maml:description><maml:para>Indicates that a trigger starts a task once at a time specified in the At parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RandomDelay</maml:name><maml:description><maml:para>Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue><dev:type><maml:name>TimeSpan</maml:name><maml:uri /></dev:type><dev:defaultValue>0</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RepetitionDuration</maml:name><maml:description><maml:para>Specifies how long the repetition pattern repeats after the task starts.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue><dev:type><maml:name>TimeSpan</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RepetitionInterval</maml:name><maml:description><maml:para>Specifies an amount of time between each restart of the task. The task will run, wait for the time interval specified, and then run again. This cycle continues for the time that you specify for the RepetitionDuration parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue><dev:type><maml:name>TimeSpan</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>User</maml:name><maml:description><maml:para>Specifies the identifier of the user for a trigger that starts a task when a user logs on.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Weekly</maml:name><maml:description><maml:para>Indicates that the trigger starts a task on a recurring weekly schedule.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>WeeksInterval</maml:name><maml:description><maml:para>Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.Management.Infrastructure.CimInstance#MSFT_TaskTrigger</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>Example 1: Register a scheduled task that starts a task once</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>The first command creates a scheduled task action named Cmd and assigns the ScheduledTaskAction object to the Sta variable.
PS C:\&gt;$Sta = New-ScheduledTaskAction -Execute "Cmd"
 
The second command creates a scheduled task trigger that starts the task once at 3:00 A.M and assigns the ScheduledTaskTrigger object to the Stt variable.
PS C:\&gt;$Stt = New-ScheduledTaskTrigger -Once -At 3am
 
The third command registers the scheduled task Task01 to run the task action named Cmd once at 3:00 A.M.
PS C:\&gt;Register-ScheduledTask Task01 -Action $Sta -Trigger $Stt
</dev:code><dev:remarks><maml:para>This example registers a scheduled task that starts once.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>Example 2: Register a scheduled task that starts every day</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>The first command creates a scheduled task action named Cmd and assigns the ScheduledTaskAction object to the Sta variable.
PS C:\&gt;$Sta = New-ScheduledTaskAction -Execute "Cmd"
 
The second command creates a scheduled task trigger that starts every day at 3:00 A.M and assigns the ScheduledTaskTrigger object to the Stt variable.
PS C:\&gt;$Stt = New-ScheduledTaskTrigger -Daily -At 3am
 
The third command registers the scheduled task Task01 to run the task action named Cmd every day at 3:00 A.M.
PS C:\&gt;Register-ScheduledTask Task01 -Action $Sta -Settings $Stt
</dev:code><dev:remarks><maml:para>This example registers a scheduled task that starts every day.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>Example 3: Register a scheduled task that starts every 3 days</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>The first command creates a scheduled task action named Cmd and assigns the ScheduledTaskAction object to the Sta variable.
PS C:\&gt;$Sta = New-ScheduledTaskAction -Execute "Cmd"
 
The second command creates a scheduled task trigger that starts every 3 days at 3:00 A.M and assigns the ScheduledTaskTrigger object to the Stt variable.
PS C:\&gt;$Stt = New-ScheduledTaskTrigger -Daily -DaysInterval 3 -At 3am
 
The third command registers the scheduled task Task01 to run the task action named cmd every 3 days at 3:00 A.M.
PS C:\&gt;Register-ScheduledTask Task01 -Action $Sta -Settings $Stt
</dev:code><dev:remarks><maml:para>This example registers a scheduled task that starts every 3 days.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>Example 4: Register a scheduled task that starts every-other week</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>The first command creates a scheduled task action named Cmd and assigns the ScheduledTaskAction object to the Sta variable.
PS C:\&gt;$Sta = New-ScheduledTaskAction -Execute "Cmd"
 
The second command creates a scheduled task trigger that starts every other Sunday at 3:00 A.M and assigns the ScheduledTaskTrigger object to the Stt variable.
PS C:\&gt;$Stt = New-ScheduledTaskTrigger -Weekly -WeeksInterval 2 -DaysOfWeek Sunday -At 3am
 
The third command registers the scheduled task Task01 to run the task action named Cmd every other Sunday at 3:00 A.M.
PS C:\&gt;Register-ScheduledTask Task01 -Action $Sta -Settings $Stt
</dev:code><dev:remarks><maml:para>This example registers a scheduled task that starts every other week.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>Example 5: Register a scheduled task that starts when a user logs on</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>The first command creates a scheduled task action named Cmd and assigns the ScheduledTaskAction object to the Sta variable.
PS C:\&gt;$Sta = New-ScheduledTaskAction -Execute "Cmd"
 
The second command creates a scheduled task trigger that starts when a user logs on, and assigns the ScheduledTaskTrigger object to the Stt variable.
PS C:\&gt;$Stt = New-ScheduledTaskTrigger -AtLogon
 
The third command registers the scheduled task Task01 to run the task action named Cmd when a user logs on.
PS C:\&gt;Register-ScheduledTask Task01 -Action $Sta -Settings $Stt
</dev:code><dev:remarks><maml:para>This example registers a scheduled task that starts when a user logs on.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri>http://go.microsoft.com/fwlink/p/?linkid=287555</maml:uri></maml:navigationLink><maml:navigationLink><maml:linkText>New-ScheduledTaskAction</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>New-ScheduledTask</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>Get-ScheduledTaskInfo</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>Enable-ScheduledTask</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>Register-ScheduledTask</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>Register-ScheduledTask</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>Start-ScheduledTask</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command>
 
</helpItems>