Skip to content

Commit 0005b00

Browse files
authored
Update New-DlpComplianceRule.md
1 parent 22c116c commit 0005b00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exchange/exchange-ps/exchange/New-DlpComplianceRule.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ Contents of the file named C:\Data\Sensitive Type.txt:
286286
}
287287
288288
$data = Get-Content -Path "C:\Data\Sensitive Type.txt" -ReadCount 0
289-
New-DLPComplianceRule -Name "Contoso Rule 1" -Policy "Contoso Policy 1" -AdvancedRule $data -NotifyUer
289+
$string = [System.Text.Encoding]::UTF8.GetString($data)
290+
New-DLPComplianceRule -Name "Contoso Rule 1" -Policy "Contoso Policy 1" -AdvancedRule $string -NotifyUser
290291
```
291292

292293
This example uses the AdvancedRule parameter to read the following complex condition from a file: "Content contains sensitive information: "Credit card number OR Highly confidential" AND (NOT (Sender is a member of "Jane's Team" OR Recipient is "[email protected]")).

0 commit comments

Comments
 (0)