File tree Expand file tree Collapse file tree 5 files changed +30
-30
lines changed
winserver2012-ps/scheduledtasks
winserver2012r2-ps/scheduledtasks
winserver2016-ps/scheduledtasks
winserver2019-ps/scheduledtasks
winserver2022-ps/scheduledtasks Expand file tree Collapse file tree 5 files changed +30
-30
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
3838
3939In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
4040
41- The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file tskmgr.exe to the variable $A .
41+ The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file ` tskmgr.exe ` to the variable ` $action ` .
4242
43- The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value AtLogon to the variable $T .
43+ The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value ` AtLogon ` to the variable ` $trigger ` .
4444
45- The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable $P .
45+ The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable ` $principal ` .
4646
47- The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable $S .
47+ The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable ` $settings ` .
4848
49- The fifth command creates a new task and assigns the task definition to the variable $D .
49+ The fifth command creates a new task and assigns the task definition to the variable ` $task ` .
5050
5151The sixth command (hypothetically) runs at a later time.
52- It registers the new scheduled task and defines it by using the $D variable.
52+ It registers the new scheduled task and defines it by using the ` $task ` variable.
5353
5454### Example 2: Define a scheduled task with multiple actions
5555``` powershell
Original file line number Diff line number Diff line change @@ -40,18 +40,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
4040
4141In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
4242
43- The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file tskmgr.exe to the variable $A .
43+ The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file ` tskmgr.exe ` to the variable ` $action ` .
4444
45- The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value AtLogon to the variable $T .
45+ The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value ` AtLogon ` to the variable ` $trigger ` .
4646
47- The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable $P .
47+ The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable ` $principal ` .
4848
49- The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable $S .
49+ The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable ` $settings ` .
5050
51- The fifth command creates a new task and assigns the task definition to the variable $D .
51+ The fifth command creates a new task and assigns the task definition to the variable ` $task ` .
5252
5353The sixth command (hypothetically) runs at a later time.
54- It registers the new scheduled task and defines it by using the $D variable.
54+ It registers the new scheduled task and defines it by using the ` $task ` variable.
5555
5656### Example 2: Define a scheduled task with multiple actions
5757``` powershell
Original file line number Diff line number Diff line change @@ -41,18 +41,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
4141
4242In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
4343
44- The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file tskmgr.exe to the variable $A .
44+ The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file ` tskmgr.exe ` to the variable ` $action ` .
4545
46- The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value AtLogon to the variable $T .
46+ The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value ` AtLogon ` to the variable ` $trigger ` .
4747
48- The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable $P .
48+ The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable ` $principal ` .
4949
50- The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable $S .
50+ The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable ` $settings ` .
5151
52- The fifth command creates a new task and assigns the task definition to the variable $D .
52+ The fifth command creates a new task and assigns the task definition to the variable ` $task ` .
5353
5454The sixth command (hypothetically) runs at a later time.
55- It registers the new scheduled task and defines it by using the $D variable.
55+ It registers the new scheduled task and defines it by using the ` $task ` variable.
5656
5757### Example 2: Define a scheduled task with multiple actions
5858``` powershell
Original file line number Diff line number Diff line change @@ -41,18 +41,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
4141
4242In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
4343
44- The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file tskmgr.exe to the variable $A .
44+ The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file ` tskmgr.exe ` to the variable ` $action ` .
4545
46- The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value AtLogon to the variable $T .
46+ The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value ` AtLogon ` to the variable ` $trigger ` .
4747
48- The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable $P .
48+ The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable ` $principal ` .
4949
50- The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable $S .
50+ The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable ` $settings ` .
5151
52- The fifth command creates a new task and assigns the task definition to the variable $D .
52+ The fifth command creates a new task and assigns the task definition to the variable ` $task ` .
5353
5454The sixth command (hypothetically) runs at a later time.
55- It registers the new scheduled task and defines it by using the $D variable.
55+ It registers the new scheduled task and defines it by using the ` $task ` variable.
5656
5757### Example 2: Define a scheduled task with multiple actions
5858``` powershell
Original file line number Diff line number Diff line change @@ -41,18 +41,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
4141
4242In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
4343
44- The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file tskmgr.exe to the variable $A .
44+ The first command uses the ** New-ScheduledTaskAction** cmdlet to assign the executable file ` tskmgr.exe ` to the variable ` $action ` .
4545
46- The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value AtLogon to the variable $T .
46+ The second command uses the ** New-ScheduledTaskTrigger** cmdlet to assign the value ` AtLogon ` to the variable ` $trigger ` .
4747
48- The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable $P .
48+ The third command assigns the principal of the scheduled task ` Contoso\Administrator ` to the variable ` $principal ` .
4949
50- The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable $S .
50+ The fourth command uses the ** New-ScheduledTaskSettingsSet** cmdlet to assign a task settings object to the variable ` $settings ` .
5151
52- The fifth command creates a new task and assigns the task definition to the variable $D .
52+ The fifth command creates a new task and assigns the task definition to the variable ` $task ` .
5353
5454The sixth command (hypothetically) runs at a later time.
55- It registers the new scheduled task and defines it by using the $D variable.
55+ It registers the new scheduled task and defines it by using the ` $task ` variable.
5656
5757### Example 2: Define a scheduled task with multiple actions
5858``` powershell
You can’t perform that action at this time.
0 commit comments