TaskSecurityAuditRuleFactory Method
Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule.
Namespace: Microsoft.Win32.TaskSchedulerAssembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
public override AuditRule AuditRuleFactory(
IdentityReference identityReference,
int accessMask,
bool isInherited,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
AuditFlags flags
)
- identityReference IdentityReference
- An IdentityReference that identifies the user or group the rule applies to.
- accessMask Int32
- A bitwise combination of TaskRights values specifying the access rights to audit, cast to an integer.
- isInherited Boolean
- Meaningless for tasks, because they have no hierarchy.
- inheritanceFlags InheritanceFlags
- Meaningless for tasks, because they have no hierarchy.
- propagationFlags PropagationFlags
- Meaningless for tasks, because they have no hierarchy.
- flags AuditFlags
- One of the AuditFlags values specifying whether to audit successful access, failed access, or both.
AuditRule
A
TaskAuditRule object representing the specified audit rule for the specified user. The return type of the method is the base class,
AuditRule, but the return value can be cast safely to the derived class.