-
Notifications
You must be signed in to change notification settings - Fork 32
Function AuditPolicy
Mark Wragg edited this page Jun 17, 2019
·
1 revision
Test an Audit Policy.
Test the setting of a particular Local Security Policy Audit Policy.
Specifies the category of the Audit Policy.
[Parameter(Mandatory, Position=2)]
[Alias("Subcategory")]
[ValidateSet(
"Security System Extension",
"System Integrity",
"IPsec Driver",
"Other System Events",
"Security State Change",
"Logon",
"Logoff",
"Account Lockout",
"IPsec Main Mode",
"IPsec Quick Mode",
"IPsec Extended Mode",
"Special Logon",
"Other Logon/Logoff Events",
"Network Policy Server",
"User / Device Claims",
"Group Membership",
"File System",
"Registry",
"Kernel Object",
"SAM",
"Certification Services",
"Application Generated",
"Handle Manipulation",
"File Share",
"Filtering Platform Packet Drop",
"Filtering Platform Connection",
"Other Object Access Events",
"Detailed File Share",
"Removable Storage",
"Central Policy Staging",
"Sensitive Privilege Use",
"Non Sensitive Privilege Use",
"Other Privilege Use Events",
"Process Termination",
"DPAPI Activity",
"RPC Events",
"Plug and Play Events",
"Token Right Adjusted Events",
"Process Creation",
"Audit Policy Change",
"Authentication Policy Change",
"Authorization Policy Change",
"MPSSVC Rule-Level Policy Change",
"Filtering Platform Policy Change",
"Other Policy Change Events",
"User Account Management",
"Computer Account Management",
"Security Group Management",
"Distribution Group Management",
"Application Group Management",
"Other Account Management Events",
"Directory Service Changes",
"Directory Service Replication",
"Detailed Directory Service Replication",
"Directory Service Access",
"Kerberos Service Ticket Operations",
"Other Account Logon Events",
"Kerberos Authentication Service",
"Credential Validation"
)]
Specifies the subcategory of the Audit Policy.
[Parameter(Mandatory, Position=1)]
[Alias("Category")]
[ValidateSet(
"System",
"Logon/Logoff",
"Object Access",
"Privilege Use",
"Detailed Tracking",
"Policy Change",
"Account Management",
"DS Access",
"Account Logon"
)]
A Script Block defining a Pester Assertion.
[Parameter(Mandatory, Position=2, ParameterSetName="Default")]
[Parameter(Mandatory, Position=3, ParameterSetName="Property")]
Assertions: -Be, -BeExactly, -Match, -MatchExactly
AuditPolicy System 'Security System Extension' { Should -Be Success }
AuditPolicy 'Logon/Logoff' 'Logon' { Should -Be 'Success and Failure' }
AuditPolicy 'Account Management' 'User Account Management' { Should -Not -Be 'No Auditing' }
Getting Started
Contributing
Functions