We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8e0645a + 8894a2f commit 3c05df0Copy full SHA for 3c05df0
docset/windows/scheduledtasks/new-scheduledtask.md
@@ -42,7 +42,7 @@ You can register a task to run any of the following application or file types: W
42
```
43
PS C:\> $A = New-ScheduledTaskAction -Execute "Taskmgr.exe"
44
PS C:\> $T = New-ScheduledTaskTrigger -AtLogon
45
-PS C:\> $P = "Contoso\Administrator"
+PS C:\> $P = New-ScheduledTaskPrincipal "Contoso\Administrator"
46
PS C:\> $S = New-ScheduledTaskSettingsSet
47
PS C:\> $D = New-ScheduledTask -Action $A -Principal $P -Trigger $T -Settings $S
48
PS C:\> Register-ScheduledTask T1 -InputObject $D
0 commit comments