-
Notifications
You must be signed in to change notification settings - Fork 619
Description
This page lacks useful documentation which would greatly aid in understanding how to use this cmdlet to create a principal object for use with scheduled tasks.
For example, I had to search long and hard for what S4U
actually even means. What a horrible name for a parameter value whose name exists because of the name in some C++ header file in the Windows SDK. It'd be fine if the documentation would even mention what it means and what it's used for.
The same goes for the rest of the valid values for LogonType
. For example, I have a user account, which is granted the SeServiceLogonRight
(Log on as a service). So does that mean I can use the ServiceAccount
logon type? Or should I still use Password
(or even Interactive
or InteractiveOrPassword
types)? (I found that using ServiceAccount
ended up locking the user account—but this would have been very useful to have documented.)
When it comes to the ProcessTokenSidType parameter—how does this affect how my task will run? It's not stated anywhere--as if I know what these parameters relate to when it comes to the Task Scheduler interface (and frankly, I don't recall any GUI options that let me specify the Process SID token type).
All in all, this documentation is lacking in key details, which does not allow the user to be immediately successful with using the Scheduled Task cmdlets to confidently and successfully create scheduled tasks using PowerShell.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: e9a7fbf9-3639-e45d-0811-807e7ce651e3
- Version Independent ID: 57bc659a-9971-ae7a-4df4-10c9c46d9ee3
- Content: New-ScheduledTaskPrincipal (ScheduledTasks)
- Content Source: docset/winserver2022-ps/scheduledtasks/New-ScheduledTaskPrincipal.md
- Product: w10
- Technology: windows
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend