windows-powershell-docs
windows-powershell-docs copied to clipboard
Not enough information about the ProcessTokenSidType and LogonType parameters
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
To make it easier for you to submit feedback on articles on learn.microsoft.com, we're transitioning our feedback system from GitHub Issues to a new experience.
As part of the transition, this GitHub Issue will be moved to a private repository. We're moving Issues to another repository so we can continue working on Issues that were open at the time of the transition. When this Issue is moved, you'll no longer be able to access it.
If you want to provide additional information before this Issue is moved, please update this Issue before December 15th, 2023.
With the new experience, you no longer need to sign in to GitHub to enter and submit your feedback. Instead, you can choose directly on each article's page whether the article was helpful. Then you can then choose one or more reasons for your feedback and optionally provide additional context before you select Submit.
Here's what the new experience looks like.
Note: The new experience is being rolled out across learn.microsoft.com in phases. If you don't see the new experience on an article, please check back later.
First, select whether the article was helpful:
Then, choose at least one reason for your feedback and optionally provide additional details about your feedback:
Article was helpful | Article was unhelpful |
---|---|
![]() |
![]() |
Finally, select Submit and you're done!