en-US

RemoveOneDriveLocation

Parameter of DlpCompliancePolicy

Applies to : Security & Compliance

Description

The RemoveOneDriveLocation parameter removes OneDrive sites from the DLP policy if they're already included. The valid value for this parameter is All.

If the policy already includes OneDrive sites (in the output of the Get-DlpCompliancePolicy cmdlet, the OneDriveLocation property value is All), you can use -RemoveOneDriveLocation All to prevent the policy from applying to OneDrive sites.

Note: Although this parameter accepts site URLs, don't specify site URLs values. Use the OneDriveSharedBy, ExceptIfOneDriveShareBy, OneDriveSharedByMemberOf, and ExceptIfOneDriveSharedByMemberOf parameters instead. In the DLP policy settings in the Microsoft Defender portal, you can't specify sites to include or exclude by URL; you specify sites to include or exclude only by users or groups.

Microsoft Learn documentation

Characteristics

Type
MultiValuedProperty
Parameter sets
Identity

Apply

This value type (MultiValuedProperty) must be built by hand: see the examples on the policy page and the Microsoft documentation.