title | description | ms.assetid | keywords | topic_type | api_name | api_location | api_type | ms.topic | ms.date | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LogonTrigger.UserId property |
For scripting, gets or sets the identifier of the user. |
d28eea9b-8238-49e7-afec-5a96281b3063 |
|
|
|
|
|
reference |
05/31/2018 |
For scripting, gets or sets the identifier of the user.
LogonTrigger.UserId As String
The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator".
This property can be in one of the following formats:
- User name or SID: The task is started when the user logs on to the computer.
- NULL: The task is started when any user logs on to the computer.
If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property.
When reading or writing XML for a task, the logon user identifier is specified using the UserId element of the Task Scheduler schema.
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Type library |
|
DLL |
|