File tree 5 files changed +30
-30
lines changed
winserver2012-ps/scheduledtasks
winserver2012r2-ps/scheduledtasks
winserver2016-ps/scheduledtasks
winserver2019-ps/scheduledtasks
winserver2022-ps/scheduledtasks
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
38
38
39
39
In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
40
40
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 ` .
42
42
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 ` .
44
44
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 ` .
46
46
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 ` .
48
48
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 ` .
50
50
51
51
The 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.
53
53
54
54
### Example 2: Define a scheduled task with multiple actions
55
55
``` powershell
Original file line number Diff line number Diff line change @@ -40,18 +40,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
40
40
41
41
In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
42
42
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 ` .
44
44
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 ` .
46
46
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 ` .
48
48
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 ` .
50
50
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 ` .
52
52
53
53
The 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.
55
55
56
56
### Example 2: Define a scheduled task with multiple actions
57
57
``` powershell
Original file line number Diff line number Diff line change @@ -41,18 +41,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
41
41
42
42
In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
43
43
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 ` .
45
45
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 ` .
47
47
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 ` .
49
49
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 ` .
51
51
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 ` .
53
53
54
54
The 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.
56
56
57
57
### Example 2: Define a scheduled task with multiple actions
58
58
``` powershell
Original file line number Diff line number Diff line change @@ -41,18 +41,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
41
41
42
42
In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
43
43
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 ` .
45
45
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 ` .
47
47
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 ` .
49
49
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 ` .
51
51
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 ` .
53
53
54
54
The 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.
56
56
57
57
### Example 2: Define a scheduled task with multiple actions
58
58
``` powershell
Original file line number Diff line number Diff line change @@ -41,18 +41,18 @@ PS C:\> Register-ScheduledTask T1 -InputObject $task
41
41
42
42
In this example, the set of commands uses several cmdlets and variables to define and then register a scheduled task.
43
43
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 ` .
45
45
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 ` .
47
47
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 ` .
49
49
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 ` .
51
51
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 ` .
53
53
54
54
The 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.
56
56
57
57
### Example 2: Define a scheduled task with multiple actions
58
58
``` powershell
You can’t perform that action at this time.
0 commit comments