API Reference
Command
Get-CxAuditPolicy
Gets advanced Audit Policy settings from a local or remote Windows host.
Examples
Example 1
Get-CxAuditPolicy -Source Native
Example 2
Get-CxAuditPolicy -ComputerName SRV1 -Source LocalPolicyCsv
Example 3
Get-CxAuditPolicy -ComputerName SRV1 -Source Registry -Category 'Logon*' -Name 'Process*' -Verbose
Example 4
Get-CxAuditPolicy -ComputerName AD1.ad.evotec.xyz -Source Native -IncludeTransportDiagnostics
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Get-CxAuditPolicy [-ComputerName <string[]>] [-Source <Native|LocalPolicyCsv|Registry>] [-Authentication <Default>] [-Category <string[]>] [-ConfigurationName <string>] [-Credential <PSCredential>] [-IdleTimeoutSeconds <int>] [-IncludePortInSpn] [-IncludeTransportDiagnostics] [-Name <string[]>] [-NoMachineProfile] [-OpenTimeoutSeconds <int>] [-OperationTimeoutSeconds <int>] [-Port <int>] [-UseSsl] [<CommonParameters>]#Parameters
- ComputerName string[]
- Target host(s). If omitted, queries the local machine.
- Source AuditPolicySource
- Data source: Native (advapi32), LocalPolicyCsv (Audit.csv), or Registry (PolAdtEv). Possible values: Native, LocalPolicyCsv, Registry
- Possible values:
Native,LocalPolicyCsv,Registry - Authentication AuthenticationMechanism
- Optional authentication mechanism for remote native audit collection. Possible values: Default, Basic, Negotiate, NegotiateWithImplicitCredential, Credssp, Digest, Kerberos
- Possible values:
Default,Basic,Negotiate,NegotiateWithImplicitCredential,Credssp,Digest,Kerberos - Category string[]
- Wildcard filter for audit policy categories (e.g., 'Logon*').
- ConfigurationName string
- Optional PowerShell endpoint configuration name for remote native audit collection.
- Credential PSCredential
- Optional alternate credential for remote native audit collection.
- IdleTimeoutSeconds int
- Optional remote session idle timeout in seconds for remote native audit collection.
- IncludePortInSpn SwitchParameter
- Includes the port in the WinRM service principal name.
- IncludeTransportDiagnostics SwitchParameter
- Includes shared WinRM transport diagnostics on returned remote native audit settings.
- Name string[]
- Wildcard filter for subcategory names (e.g., 'Process*').
- NoMachineProfile SwitchParameter
- Requests a WinRM session without loading the remote machine profile.
- OpenTimeoutSeconds int
- Optional remote session open timeout in seconds for remote native audit collection.
- OperationTimeoutSeconds int
- Optional remote operation timeout in seconds for remote native audit collection.
- Port int
- Optional WinRM port override for remote native audit collection.
- UseSsl SwitchParameter
- Uses HTTPS when invoking remote native audit collection.
Outputs
ComputerX.Audit.AuditSubcategorySetting