Managing SQL Extended Events Auditing (Preview)
Get-CASQLExtendedEventsInfo
Table 56. Parameter description
A connection obtained by using the Connect-CAClient command.
Example: Get all available SQL Extended Events event names and filters (predicates) available from the SQL Server. New-CASQLExtendedEventsFilter
Use this command to specify a filter for the SQL Extended Events to audit when creating templates.
Table 57. Parameter description
The available event and filter information obtained using the Get-CASQLExtendedEventsInfo command.
The operator to be used for comparison. See the output obtained from the Get-CASQLExtendedEventsInfo command for available operators for the specified filter field.
Example: Filter on a specified field and value. New-CASQLExtendedEventsObject
Use this command to specify the SQL Extended Events to audit.
Table 58. Parameter description
The available event and filter information obtained using thee Get-CASQLExtendedEventsInfo command.
Example: Populate a SQL Extended Events audited event name list New-CASQLExtendedEventsTemplate
Use this command to create SQL Extended Events auditing templates.
Table 59. Parameter description
A connection obtained by using the Connect-CAClient command.
The list of events to audit using New-CASQLExtendedEventsObject.
A list of event filters using New-CASQLExtendedEventsFilter.
An agent object obtained using the Get-CAAgents command. If not specified, it will expect an agent installed on the SQL server to be audited. The agent is used for SQL Extended Events session management and event auditing.
Example: New SQL Extended Events template Get-CASQLExtendedEventsTemplates
Use this command to see all the SQL Extended Events templates that have been created.
Table 60. Parameter description
A connection obtained by using the Connect-CAClient command.
Example: Get all the SQL Extended Events templates Get-CASqlExtendedEventsTemplates -Connection $connection
Example: Get SQL Extended Events templates filtered by a specified name Get-CASqlExtendedEventsTemplates -Connection $connection | Filter.Where(_$.name = "MyTemplate")
Remove-CASQLExtendedEventsTemplate
Use this command to delete a specified SQL Extended Events template.
Table 61. Parameter description
The template object obtained using Get-CASQLExtendedEventsTemplates.
Example: Remove all the SQL Extended Events templates Remove-CASQLExtendedEventsTemplate -Connection $connection -Template $template
Managing Microsoft Entra ID auditing
NOTE: When you delete a template (see Remove-CAAgentTemplate), the web application created in Microsoft Entra ID remains. You can delete the web application using the Microsoft Entra admin center. If you do not have the portal, see https://technet.microsoft.com/en-us/library/dn832618.aspx for instructions.
New-CAAzureADTemplate
Use this command to create a template for auditing Microsoft Entra ID.
Table 62. Available parameters
Example: Creating Microsoft Entra ID auditing template that will collect events generated 30 days in the past. $connection = Connect-CAClient –InstallationName ‘Default'
Create a template using an existing web application
The following permissions must be assigned to the web application:
Table 63. Required permission
Once the required permissions are applied, click Grant admin consent for… and confirm with Yes.
Table 64. Available parameters
An agent object obtained using the Get-CAAgents command. The agent will be used for Microsoft Entra ID auditing.
• If the agent is separated from the coordinator by a firewall, you must create a firewall exception for port 8373 on every agent computer to be used for Microsoft Entra ID auditing. This is the default port that enables the coordinator to communicate with the agent. A different port number can, however, be specified by running the Set-CAConfiguration command.A connection obtained by using the Connect-CAClient command.
Specifies the tenant type (Commercial, GCC, or GCCHigh). If not set, the default is Commercial.
Specifies whether auditing is enabled or disabled for Microsoft Entra ID.
Example: Creating an Microsoft Entra ID auditing template using a pre-created web application that will collect events generated 30 days in the past.Set-CAAzureADTemplate
Table 65. Available parameters
An agent object obtained using the Get-CAAgents command. The agent will be used for Microsoft Entra ID auditing.
• If the agent is separated from the coordinator by a firewall, you must create a firewall exception for port 8373 on every agent computer to be used for Microsoft Entra ID auditing. This is the default port that enables the coordinator to communicate with the agent. A different port number can, however, be specified by running the Set-CAConfiguration command.A connection obtained by using the Connect-CAClient command.
A template object obtained by the Get-CAAzureADTemplates command.
Specifies that you want to create a new web application.
The Microsoft sign-in page opens automatically.
2To apply the consent to all the users in your organization, click to enable Consent on behalf of your organization and click Accept.
To apply the consent for just the current signed-in user simply click Accept.
Example: Modify web application credentials in an auditing template Example: Add auditing of all activities to an existing template Set-CAAzureADTemplate -Connection $connection -Template $template -SignIns $True
-AuditLogs $TrueGet-CAAzureADTemplates
Use this command to see all the Microsoft Entra ID templates available within your installation.
Table 66. Available parameters
A connection obtained by using the Connect-CAClient command.
Example: Get a list of all Microsoft Entra ID templates
Managing Office 365 auditing
NOTE: When you delete a template (see Remove-CAAgentTemplate), the web application created in Microsoft Entra ID remains. You can delete the web application using the Microsoft Entra admin center. If you do not have the portal, see https://technet.microsoft.com/en-us/library/dn832618.aspx for instructions.
New-CAO365Template
Table 67. Available parameters
An agent obtained by using the Get-CAAgents command.
• If the agent is separated from the coordinator by a firewall, you must create a firewall exception for port 8373 on every agent computer to be used for Office 365 auditing. This is the default port that enables the coordinator to communicate with the agent. A different port number can, however, be specified by running the Set-CAConfiguration command.A connection obtained by using the Connect-CAClient command.
Specifies that you want to create a new web application.
The Microsoft sign-in page opens automatically.
2To apply the consent to all the users in your organization, click to enable Consent on behalf of your organization and click Accept.
To apply the consent for just the current signed-in user simply click Accept.
Specifies the tenant type (Commercial, GCC, or GCCHigh). If not set, the default is Commercial.
The filename of an exported X509 certificate with private key.
Specifies whether the auditing template is enabled or disabled.
Specifies whether Exchange Online auditing is enabled or disabled.
Specifies whether OneDrive for Business auditing is enabled or disabled.
Specifies whether SharePoint Online auditing is enabled or disabled.
Example: Create a template that audits both Exchange Online administration and mailbox non-owner events and will collect events generated 7 days in the past. Create a template using an existing web application
Table 68. Available parameters
An agent object obtained by using the Get-CAAgents command.
• If the agent is separated from the coordinator by a firewall, you must create a firewall exception for port 8373 on every agent computer to be used for Office 365 auditing. This is the default port that enables the coordinator to communicate with the agent. A different port number can, however, be specified by running the Set-CAConfiguration command.A connection obtained by using the Connect-CAClient command.
Specifies the tenant type (Commercial, GCC, or GCCHigh). If not set, the default is Commercial.
The filename of an exported X509 certificate with private key.
Specifies whether the auditing template is enabled or disabled.
Specifies whether Exchange Online auditing is enabled or disabled.
Specifies whether OneDrive for Business auditing is enabled or disabled.
Specifies whether SharePoint Online auditing is enabled or disabled.
Example: Create a template that audits both Exchange Online administration and mailbox non-owner events and will collect events generated 7 days in the past. Set-CAO365Template
A connection obtained by using the Connect-CAClient command.
A template object obtained by using the Get-CAO365Templates command.
Specifies that you want to create a new web application.
The Microsoft sign-in page opens automatically.
2To apply the consent to all the users in your organization, click to enable Consent on behalf of your organization and click Accept.
To apply the consent for just the current signed-in user simply click Accept.
An agent object obtained by using the Get-CAAgents command.
• If the agent is separated from the coordinator by a firewall, you must create a firewall exception for port 8373 on every agent computer to be used for Office 365 auditing. This is the default port that enables the coordinator to communicate with the agent. A different port number can, however, be specified by running the Set-CAConfiguration command.Specifies whether to audit all Exchange Online mailboxes accessed by non-owners.
The filename of an exported X509 certificate with private key.
Specifies whether Exchange Online auditing is enabled or disabled.
Specifies whether OneDrive for Business auditing is enabled or disabled.
Specifies whether SharePoint Online auditing is enabled or disabled.
Example: Enable auditing all Office 365 Exchange Online mailboxes accessed by non-owners Set-CAO365Template -Connection $connection -Template $template
-AuditOrganization $trueExample: Enable auditing of SharePoint Online and OneDrive for Business Example: Generate a new web application and new certificate for an existing O365 auditing template. Example: Replace the web application
Example: Replace the agent Set-CAO365Template -Connection $connection -Template $template -AgentInfo $agent
Get-CAO365Templates
Use this command to see all the Office 365 templates available within your installation.
Table 69. Available parameters
A connection obtained by using the Connect-CAClient command.
Example: Get a list of all Office 365 templates Get-CAO365Templates -Connection $connection
Remove-CAO365Template
Table 70. Available parameters
A connection obtained by using the Connect-CAClient command.
The Office 365 tenant that is used for auditing. For example, yourTenantName.onmicrosoft.com.
Example: Remove an Office 365 template Remove-CAO365Template -Connection $connection -Tenant $tenant
Get-CAO365ExchangeMailboxes
Table 71. Available parameters
A connection obtained by using the Connect-CAClient command.
The Office 365 tenant that is used for auditing. For example, yourTenantName.onmicrosoft.com.
The number of objects to exclude from the list of returned objects, starting from the top.
Example: Find all Office 365 mailboxes that start with the letter a Get-CAO365ExchangeMailboxes -Connection $connection -Tenant $tenant -SearchText "a"
Add-CAO365ExchangeTemplateMailboxes
Table 72. Available parameters
A connection obtained by using the Connect-CAClient command.
A template object obtained by using the Get-CAO365Templates command.
Mailbox objects obtained by using the Get-CAO365ExchangeMailboxes command.
Example: Add Office 365 mailboxes to the existing Exchange Online template Remove-CAO365ExchangeTemplateMailboxes
Use this command to remove mailboxes from an existing Office 365 Exchange Online template.
Table 73. Available parameters
A connection obtained by using the Connect-CAClient command.
A template object obtained by using the Get-CAO365Templates command.
Mailbox objects obtained by using the Get-CAO365ExchangeMailboxes command.
A switch that indicates that all mailboxes will be removed from the template.
Example: Remove all Office 365 mailboxes from the existing Exchange Online template Remove-CAO365ExchangeTemplateMailboxes -Connection $connection -Template $template –All
Get-CAO365ExchangeTemplateMailboxes
Table 74. Available parameters
A connection obtained by using the Connect-CAClient command.
A template object obtained by using the Get-CAO365Templates command.
The number of objects to exclude from the list of returned objects, starting from the top.
Example: Get all Office 365 audited mailboxes from the existing Exchange Online template Get-CAO365ExchangeTemplateMailboxes -Connection $connection -Template $template
Example: This example will return mailboxes that are not enabled for owner auditing where the display name starts with “Sam S”
Configuring a Quest On Demand Audit integration
Quest On Demand Audit is a Software as a Service (SaaS) application, available through quest-on-demand.com that provides extensive, customizable auditing of critical activities and detailed alerts about vital changes taking place in Microsoft 365 and Microsoft Entra ID.
New-CAODAConfiguration
A connection obtained by using the Connect-CAClient command.
Example: Create a subscription to send Active Directory event data to On Demand Audit
New-CAODAConfiguration -Connection $connection
Get-CAODAConfiguration
Use this command to see the details of the current On Demand Audit configuration.
Table 75. Available parameters
A connection obtained by using the Connect-CAClient command.
Example: Get information about the On Demand Audit configuration Get-CAODAConfiguration -Connection $connection
The command returns the following information.
Table 76. Available information about the subscription created by the configuration
Batch size. (The maximum number of events that the active batch size can increase to.)
The last event response. Provides the response in JSON format from the event receiver.
How often how often (in milliseconds) notifications are sent.
Set-CAODAConfiguration
Use this command to modify an On Demand Audit configuration.
Set-CAODAConfiguration -Connection $connection -AllowedCoordinators @("coordinator1", "coordinator2")
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center