Skip to content

Commit bb2e6af

Browse files
committed
Update New-DlpCompliancePolicy.md
Example 4 updates
1 parent 14e4fca commit bb2e6af

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

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

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,12 @@ This example creates a DLP policy named PowerBIPolicy for all qualifying Power B
9696
### Example 4
9797
```powershell
9898
Get-Label | Format-List Priority,ContentType,Name,DisplayName,Identity,Guid
99-
```
100-
101-
This example creates a DLP policy for Microsoft 365 Copilot (Preview) in several steps.
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`.
10499
105-
```powershell
106100
$guidVar = "e222b65a-b3a8-46ec-ae12-00c2c91b71c0"
107-
```
108101
109-
This second command stores the GUID value of the sensitivity label in the variable named $guidVar.
110-
111-
```powershell
112102
$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.
116103
117-
```powershell
118-
$advrule = @{
104+
$advRule = @{
119105
"Version" = "1.0"
120106
"Condition" = @{
121107
"Operator" = "And"
@@ -142,15 +128,21 @@ $advrule = @{
142128
)
143129
}
144130
} | 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.
148131
149-
```powershell
150132
New-DLPComplianceRule -Policy "Policy Name" -Name "Rule Name" -AdvancedRule $advrule -RestrictAccess @(@{setting="ExcludeContentProcessing";value="Block"})
151133
```
152134

153-
In this command, replace "Policy Name" and "Rule Name" with the values you want to use.
135+
This example creates a DLP policy for Microsoft 365 Copilot (Preview) in several steps:
136+
137+
- The 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`.
138+
139+
- The second command stores the GUID value of the sensitivity label in the variable named $guidVar.
140+
141+
- The 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.
142+
143+
- The fourth command creates the variable named $advRule. The advanced rule needs to be updated depending on the grouping of labels you want to provide as input.
144+
145+
- The last command creates the DLP rule. Replace "Policy Name" and "Rule Name" with the values you want to use.
154146

155147
## PARAMETERS
156148

0 commit comments

Comments
 (0)