 | 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.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic override AuditRule AuditRuleFactory(
IdentityReference identityReference,
int accessMask,
bool isInherited,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
AuditFlags flags
)
Public Overrides Function AuditRuleFactory (
identityReference As IdentityReference,
accessMask As Integer,
isInherited As Boolean,
inheritanceFlags As InheritanceFlags,
propagationFlags As PropagationFlags,
flags As AuditFlags
) As AuditRule
public:
virtual AuditRule^ AuditRuleFactory(
IdentityReference^ identityReference,
int accessMask,
bool isInherited,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags,
AuditFlags flags
) override
Request Example
View SourceParameters
- identityReference
- Type: System.Security.PrincipalIdentityReference
An IdentityReference that identifies the user or group the rule applies to. - accessMask
- Type: SystemInt32
A bitwise combination of TaskRights values specifying the access rights to audit, cast to an integer. - isInherited
- Type: SystemBoolean
Meaningless for tasks, because they have no hierarchy. - inheritanceFlags
- Type: System.Security.AccessControlInheritanceFlags
Meaningless for tasks, because they have no hierarchy. - propagationFlags
- Type: System.Security.AccessControlPropagationFlags
Meaningless for tasks, because they have no hierarchy. - flags
- Type: System.Security.AccessControlAuditFlags
One of the AuditFlags values specifying whether to audit successful access, failed access, or both.
Return Value
Type:
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.
See Also