Skip to content

Commit 37e7e9a

Browse files
authored
Merge pull request MicrosoftDocs#11423 from ybhargav1995/patch-27
Update New-DlpComplianceRule.md
2 parents 02d502f + dd6bd29 commit 37e7e9a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,11 @@ Contents of the file named C:\Data\Sensitive Type.txt:
285285
}
286286
}
287287
288-
$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
288+
$data = Get-Content -Path "C:\Data\Sensitive Type.txt" -ReadCount 0 -encoding Byte
289+
290+
$string = [System.Text.Encoding]::UTF8.GetString($data)
291+
292+
New-DLPComplianceRule -Name "Contoso Rule 1" -Policy "Contoso Policy 1" -AdvancedRule $string -NotifyUser
290293
```
291294

292295
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)