AddOneDriveLocation
Parameter of DlpCompliancePolicy
Applies to : Security & Compliance
Description
The AddOneDriveLocation parameter adds OneDrive sites to the DLP policy if they aren't already included. The valid value for this parameter is All.
If the policy doesn't already include OneDrive sites (in the output of the Get-DlpCompliancePolicy cmdlet, the OneDriveLocation property value is blank), you can use this parameter in the following procedures:
- If you use
-AddOneDriveLocation Allby itself, the policy applies to all OneDrive sites.
- To include sites of specific OneDrive accounts in the policy, use
-AddOneDriveLocation Alland the OneDriveSharedBy parameter to specify the users. Only the sites of the specified users are included in the policy.
- To include sites of specific group members in the policy, use
-AddOneDriveLocation Alland the OneDriveSharedByMemberOf parameter to specify the groups. Only the sites of members of the specified groups are included in the policy.
- To exclude sites of specific OneDrive accounts from the policy, use
-AddOneDriveLocation Alland the ExceptIfOneDriveSharedBy parameter to specify the users. Only sites of the specified users are excluded from the policy.
- To exclude sites of specific group members from the policy, use
-AddOneDriveLocation Alland the ExceptIfOneDriveSharedByMemberOf parameter to specify the groups. Only sites of members of the specified groups are excluded from the policy.
You can't specify inclusions and exclusions in the same policy.
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.
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.