Skip to content

Commit 499ae6f

Browse files
committed
Locations parameter
1 parent 7afb89a commit 499ae6f

File tree

2 files changed

+81
-3
lines changed

2 files changed

+81
-3
lines changed

exchange/exchange-ps/exchange/New-DlpCompliancePolicy.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,71 @@ New-DlpCompliancePolicy -Name "GlobalPolicy" -Comment "Primary policy" -SharePoi
8787
This example creates a DLP policy named GlobalPolicy for the specified SharePoint Online and OneDrive for Business locations. The new policy has a descriptive comment and will be enabled on creation.
8888

8989
### Example 3
90-
9190
```powershell
9291
New-DlpCompliancePolicy -Name "PowerBIPolicy" -Comment "Primary policy" -PowerBIDlpLocation "All" -PowerBIDlpLocationException "workspaceID1","workspaceID2","workspaceID3" -Mode Enable
9392
```
9493

9594
This example creates a DLP policy named PowerBIPolicy for all qualifying Power BI workspaces (that is, those hosted on Premium Gen2 capacities) except for the specified workspaces. The new policy has a descriptive comment and will be enabled on creation.
9695

96+
### Example 4
97+
This example creates a DLP policy for Microsoft 365 Copilot (Preview) in several steps.
98+
99+
```powershell
100+
Get-Label | Format-List Priority,ContentType,Name,DisplayName,Identity,Guid
101+
```
102+
103+
This first command returns information about all sensitivity labels. Select the GUID value of the sensitivity label that you want to use. For example, `e222b65a-b3a8-46ec-ae12-00c2c91b71c0`.
104+
105+
```powershell
106+
$guidVar = "e222b65a-b3a8-46ec-ae12-00c2c91b71c0"
107+
```
108+
109+
This second command stores the GUID value of the sensitivity label in the variable named $guidVar.
110+
111+
```powershell
112+
$loc = "[{"Workload":"Applications","Location":"470f2276-e011-4e9d-a6ec-20768be3a4b0","Inclusions":[{Type:"Tenant", Identity:"All"}]}]"
113+
```
114+
115+
This third command creates the DLP policy. The Location value 470f2276-e011-4e9d-a6ec-20768be3a4b0 is Microsoft 365 Copilot. The $loc value needs to be updated depending on what Inclusions/Exclusions scoping you want to provide.
116+
117+
```powershell
118+
$advrule = @{
119+
"Version" = "1.0"
120+
"Condition" = @{
121+
"Operator" = "And"
122+
"SubConditions" = @(
123+
@{
124+
"ConditionName" = "ContentContainsSensitiveInformation"
125+
"Value" = @(
126+
@{
127+
"groups" = @(
128+
@{
129+
"Operator" = "Or"
130+
"labels" = @(
131+
@{
132+
"name" = $guidVar
133+
"type" = "Sensitivity"
134+
}
135+
)
136+
"name" = "Default"
137+
}
138+
)
139+
}
140+
)
141+
}
142+
)
143+
}
144+
} | ConvertTo-Json -Depth 100
145+
```
146+
147+
The advanced rule needs to be updated depending on the grouping of labels you want to provide as input.
148+
149+
```powershell
150+
New-DLPComplianceRule -Policy "Policy Name" -Name "Rule Name" -AdvancedRule $advrule -RestrictAccess @(@{setting="ExcludeContentProcessing";value="Block"})
151+
```
152+
153+
In this command, replace "Policy Name" and "Rule Name" with the values you want to use.
154+
97155
## PARAMETERS
98156

99157
### -Name
@@ -426,7 +484,17 @@ Accept wildcard characters: False
426484
```
427485

428486
### -Locations
429-
{{ Fill Locations Description }}
487+
The Locations param specifies the workload, location, and security groups, distribution groups, or users that the DLP policy applies to. You can use this parameter with the following properties:
488+
489+
- Workload: Workloads where DLP policy should apply to. Set the value to Applications.
490+
- Location: Specific locations where DLP policy should apply to. For Microsoft 365 Copilot, (Preview), use the value 470f2276-e011-4e9d-a6ec-20768be3a4b0.
491+
- Inclusions: Add security groups, distribution list or individuals to the scope of this DLP policy.
492+
493+
For example:
494+
495+
`$loc = "[{"Workload":"Applications","Location":"470f2276-e011-4e9d-a6ec-20768be3a4b0","Inclusions":[{Type:"Tenant",Identity:"All"}]}]"`
496+
497+
And then use the value $loc for this parameter.
430498

431499
```yaml
432500
Type: String

exchange/exchange-ps/exchange/Set-DlpCompliancePolicy.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,17 @@ Accept wildcard characters: False
743743
```
744744

745745
### -Locations
746-
{{ Fill Locations Description }}
746+
The Locations param specifies the workload, location, and security groups, distribution groups, or users that the DLP policy applies to. You can use this parameter with the following properties:
747+
748+
- Workload: Workloads where DLP policy should apply to. Set the value to Applications.
749+
- Location: Specific locations where DLP policy should apply to. For Microsoft 365 Copilot, (Preview), use the value 470f2276-e011-4e9d-a6ec-20768be3a4b0.
750+
- Inclusions: Add security groups, distribution list or individuals to the scope of this DLP policy.
751+
752+
For example:
753+
754+
`$loc = "[{"Workload":"Applications","Location":"470f2276-e011-4e9d-a6ec-20768be3a4b0","Inclusions":[{Type:"Tenant",Identity:"All"}]}]"`
755+
756+
And then use the value $loc for this parameter.
747757

748758
```yaml
749759
Type: String

0 commit comments

Comments
 (0)