Edit

Share via


Set-AuditConfig

This cmdlet is available only in Security & Compliance PowerShell. For more information, see Security & Compliance PowerShell.

Use the Set-AuditConfig cmdlet to configure the auditing configuration in the Microsoft Purview compliance portal.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Default (Default)

Set-AuditConfig
    [[-Identity] <PolicyIdParameter>]
    -Workload <MultiValuedProperty>
    [-DomainController <Fqdn>]
    [-Organization <OrganizationIdParameter>]
    [<CommonParameters>]

Description

To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see Permissions in the Microsoft Purview compliance portal.

Examples

Example 1

Set-AuditConfig -Workload Exchange,SharePoint

This example sets the auditing configuration for Exchange and SharePoint.

Parameters

-DomainController

Applicable: Security & Compliance

This parameter is reserved for internal Microsoft use.

Parameter properties

Type:Fqdn
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Security & Compliance

This parameter is reserved for internal Microsoft use.

Parameter properties

Type:PolicyIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Organization

Applicable: Security & Compliance

This parameter is reserved for internal Microsoft use.

Parameter properties

Type:OrganizationIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Workload

Applicable: Security & Compliance

The Workload parameter specifies where auditing is allowed. Valid values are:

  • Exchange
  • InTune
  • OneDriveForBusiness
  • SharePoint

You can specify multiple values separated by commas.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.