Skip to content

Commit f8dc078

Browse files
authored
Merge branch 'master' into master
2 parents 20484a0 + f40b56f commit f8dc078

File tree

77 files changed

+181
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+181
-154
lines changed
Loading

exchange/exchange-ps/exchange/Export-DlpPolicyCollection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3737

3838
### Example 1
3939
```powershell
40-
$file = Export-DlpPolicyCollection
41-
Set-Content -Path "C:\My Documents\Contoso PII.xml" -Value $file.FileData -Encoding Byte
40+
$DlpPol = Export-DlpPolicyCollection
41+
[System.IO.File]::WriteAllBytes('C:\My Documents\Contoso PII.xml', $DlpPol.FileData)
4242
```
4343

4444
This example exports all the elements of the existing DLP policies to the file C:\\My Documents\\Contoso PII.xml.

exchange/exchange-ps/exchange/Export-JournalRuleCollection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3939
### Example 1
4040
```powershell
4141
$file = Export-JournalRuleCollection
42-
Set-Content -Path "C:\MyDocs\JournalRules.xml" -Value $file.FileData -Encoding Byte
42+
[System.IO.File]::WriteAllBytes('C:\MyDocs\JournalRules.xml', $file.FileData)
4343
```
4444

4545
This example exports journal rules in a two-step process. In the first step, the Export-JournalRuleCollection cmdlet exports journal rules to the variable $file. In the second step, the Set-Content cmdlet saves the exported data to the XML file JournalRules.xml.
4646

4747
### Example 2
4848
```powershell
4949
$file = Export-JournalRuleCollection -ExportLegacyRules
50-
Set-Content -Path "C:\MyDocs\Ex2007-JournalRules.xml" -Value $file.FileData -Encoding Byte
50+
[System.IO.File]::WriteAllBytes('C:\MyDocs\LegacyJournalRules.xml', $file.FileData)
5151
```
5252

53-
In Exchange Server 2010, this example exports legacy journal rules to an XML file using the two-step process similar to the preceding example. In the first step, the Export-JournalRuleCollection cmdlet is used with the ExportLegacyRules switch to export legacy rules to the array $file. In the second step, the exported data is saved to the XML file Ex2007-JournallRules.xml.
53+
In Exchange Server 2010, this example exports legacy journal rules that were created in Exchange 2007 to an XML file. The first command uses the ExportLegacyRules switch to export legacy journal rules to the variable named $file. The second step saves the exported data to the XML file named LegacyJournalRules.xml.
5454

5555
## PARAMETERS
5656

exchange/exchange-ps/exchange/Export-RecipientDataProperty.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4747

4848
### Example 1
4949
```powershell
50-
Export-RecipientDataProperty -Identity [email protected] -SpokenName | ForEach { $_.FileData | Add-Content C:\tonysmith.wma -Encoding Byte}
50+
$SN = Export-RecipientDataProperty -Identity [email protected] -SpokenName
51+
[System.IO.File]::WriteAllBytes('C:\tonysmith.wma', $SN.FileData)
5152
```
5253

5354
This example exports Tony Smith's spoken name audio file and saves it to the local computer.
5455

5556
### Example 2
5657
```powershell
57-
Export-RecipientDataProperty -Identity "Ayla" -Picture | ForEach { $_.FileData | Add-Content C:\aylakol.jpg -Encoding Byte}
58+
$Pic = Export-RecipientDataProperty -Identity "Ayla Kol" -Picture
59+
[System.IO.File]::WriteAllBytes('C:\Data\aylakol.jpg', $Pic.FileData)
5860
```
5961

6062
This example exports Ayla Kol's picture file to the local computer.

exchange/exchange-ps/exchange/Export-TransportRuleCollection.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,22 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4242
### Example 1
4343
```powershell
4444
$file = Export-TransportRuleCollection
45-
Set-Content -Path "C:\My Docs\Rules.xml" -Value $file.FileData -Encoding Byte
45+
[System.IO.File]::WriteAllBytes('C:\My Docs\Rules.xml', $file.FileData)
4646
```
4747

4848
This example exports transport rules. Rule data is first exported to the variable $file, and then written to the XML file Rules.xml in the C:\\My Docs folder.
4949

50-
**Note**: In PowerShell 6.0 or later, replace `-Encoding Byte` with `-AsByteStream`.
51-
5250
### Example 2
5351
```powershell
5452
$file = Export-TransportRuleCollection -ExportLegacyRules
55-
Set-Content -Path "C:\MyDocs\LegacyRules.xml" -Value $file.FileData -Encoding Byte
53+
[System.IO.File]::WriteAllBytes('C:\My Docs\LegacyRules.xml', $file.FileData)
5654
```
5755

58-
In Exchange Server 2010, this example exports legacy transport rules created in Exchange 2007 using the ExportLegacyRules switch. The cmdlet should be run from an Exchange 2010 Hub Transport server. The exported rules collection can then be imported to Exchange 2010 using the Import-TransportRuleCollection cmdlet.
56+
In Exchange Server 2010, this example exports legacy transport rules that were created in Exchange 2007 to an XML file. The first command uses the ExportLegacyRules switch to export legacy transport rules to the variable named $file. The second step saves the exported data to the XML file named LegacyRules.xml.
57+
58+
You can import the exported rules collection to Exchange 2010 using the Import-TransportRuleCollection cmdlet.
59+
60+
You need to run these commands in this example on an Exchange 2010 Hub Transport server.
5961

6062
## PARAMETERS
6163

exchange/exchange-ps/exchange/Export-UMPrompt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
5050
### Example 1
5151
```powershell
5252
$prompt = Export-UMPrompt -PromptFileName "customgreeting.mp3" -UMDialPlan MyUMDialPlan
53-
Set-Content -Path "d:\DialPlanPrompts\welcomegreeting.mp3" -Value $prompt.AudioData -Encoding Byte
53+
[System.IO.File]::WriteAllBytes('D:\DialPlanPrompts\welcomegreeting.mp3', $prompt.AudioData)
5454
```
5555

5656
This example exports the welcome greeting for the UM dial plan MyUMDialPlan and saves it as the file welcomegreeting.mp3.
5757

5858
### Example 2
5959
```powershell
6060
$prompt = Export-UMPrompt -PromptFileName "welcomegreeting.mp3" -UMAutoAttendant MyUMAutoAttendant
61-
Set-Content -Path "e:\UMPromptsBackup\welcomegreetingbackup.mp3" -Value $prompt.AudioData -Encoding Byte
61+
[System.IO.File]::WriteAllBytes('E:\UMPromptsBackup\welcomegreetingbackup.mp3', $prompt.AudioData)
6262
```
6363

6464
This example exports a custom greeting for the UM auto attendant MyUMAutoAttendant and saves it to the file welcomegreetingbackup.mp3.

exchange/exchange-ps/exchange/Get-ComplianceCase.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ The CaseType parameter specifies the type of compliance case that you want to vi
8888
8989
- AdvancedEdiscovery: Advanced eDiscovery cases are used to manage legal or other types of investigations. In the Microsoft 365 compliance center, Advanced eDiscovery cases are displayed under **eDiscovery** \> **Advanced eDiscovery**.
9090
- ComplianceClassifier: This type of case corresponds to a trainable classifier. In the Microsoft 365 compliance center, trainable classifiers are displayed under **Data classification** \> **Trainable classifiers**.
91-
- ComplianceWorkspace: This value is reserved for internal Microsoft use.- DataInvestigation: Data investigation cases are used to investigate data spillage incidents. In the Microsoft 365 compliance center, Data investigation cases are displayed on the Data investigations page.
91+
- ComplianceWorkspace: This value is reserved for internal Microsoft use.
92+
- DataInvestigation: Data investigation cases are used to investigate data spillage incidents. In the Microsoft 365 compliance center, Data investigation cases are displayed on the **Data investigations** page.
9293
- DSR: Data Subject Request (DSR) cases are used to manage General Data Protection Regulation (GDPR) DSR investigations. In the Microsoft 365 compliance center, DSR cases are displayed under **Data privacy** \> **Data subject requests**.
9394
- eDiscovery: eDiscovery (also called core eDiscovery) cases are used to manage legal or other types of investigations. In the Microsoft 365 compliance center, core eDiscovery cases are displayed under **eDiscovery** \> **eDiscovery**. This is the default value.
94-
- InsiderRisk: Insider risk cases are use to manage insider risk management cases. In the Microsoft 365 compliance center, insider risk cases are displayed under **Insider risk management** \> **Cases**. Typically, insider risk management cases are manually created in the compliance center to further investigate activity based on an risk alert.
95+
- InsiderRisk: Insider risk cases are used to manage insider risk management cases. In the Microsoft 365 compliance center, insider risk cases are displayed under **Insider risk management** \> **Cases**. Typically, insider risk management cases are manually created in the compliance center to further investigate activity based on a risk alert.
9596
- InternalInvestigation: This value is reserved for internal Microsoft use.
9697
- SupervisionPolicy: This type of case corresponds to communication compliance policy. In the Microsoft 365 Compliance center, communication compliance policies are displayed under **Communication compliance** \> **Policies**.
9798

exchange/exchange-ps/exchange/Import-DlpPolicyCollection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4040

4141
### Example 1
4242
```powershell
43-
Import-DlpPolicyCollection -FileData ([Byte[]]$(Get-Content -Path " C:\My Documents\DLP Backup.xml " -Encoding Byte -ReadCount 0))
43+
Import-DlpPolicyCollection -FileData ([System.IO.File]::ReadAllBytes('C:\My Documents\DLP Backup.xml'))
4444
```
4545

4646
This example imports the DLP policy collection in the file C:\\My Documents\\DLP Backup.xml.

exchange/exchange-ps/exchange/Import-DlpPolicyTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3434

3535
### Example 1
3636
```powershell
37-
Import-DlpPolicyTemplate -FileData ([Byte[]]$(Get-Content -Path "C:\My Documents\External DLP Policy Template.xml" -Encoding Byte -ReadCount 0))
37+
Import-DlpPolicyTemplate -FileData ([System.IO.File]::ReadAllBytes('C:\My Documents\External DLP Policy Template.xml'))
3838
```
3939

4040
This example imports the DLP policy template file C:\\My Documents\\External DLP Policy Template.xml.

exchange/exchange-ps/exchange/Import-ExchangeCertificate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ This example imports the certificate from the PKCS #12 file from \\\\FileServer0
8484

8585
### Example 2
8686
```powershell
87-
Import-ExchangeCertificate -FileData ([Byte[]](Get-Content -Path "C:\Certificates\Fabrikam IssuedCert.p7b" -Encoding byte -ReadCount 0))
87+
Import-ExchangeCertificate -FileData ([System.IO.File]::ReadAllBytes('C:\Certificates\Fabrikam IssuedCert.p7b'))
8888
```
8989

9090
This example imports a chain of certificates from the PKCS #7 file C:\\Certificates\\Fabrikam IssuedCert.p7b on the local Exchange server.

exchange/exchange-ps/exchange/Import-JournalRuleCollection.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,10 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4343

4444
### Example 1
4545
```powershell
46-
[Byte[]]$Data = Get-Content -Path "C:\JournalRules\ExportedJournalRules.xml" -Encoding Byte -ReadCount 0
47-
Import-JournalRuleCollection -FileData $Data
46+
Import-JournalRuleCollection -FileData ([System.IO.File]::ReadAllBytes('C:\JournalRules\ExportedJournalRules.xml'))
4847
```
4948

50-
This example imports journal rules from the XML file ExportedJournalRules.xml in a two-step process.
51-
52-
The first step retrieves journal rules from the previously exported XML file ExportedJournalRules.xml using the Get-Content cmdlet, and then stores the results in the variable $Data. The second step retrieves data from the variable $Data and imports journal rules to your organization, overwriting existing journal rules.
49+
This example imports journal rules from the XML file named ExportedJournalRules.xml in the C:\\JournalRules folder.
5350

5451
## PARAMETERS
5552

exchange/exchange-ps/exchange/Import-RecipientDataProperty.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4747

4848
### Example 1
4949
```powershell
50-
Import-RecipientDataProperty -Identity "Tony Smith" -SpokenName -FileData ([Byte[]]$(Get-Content -Path "M:\AudioFiles\TonySmith.wma" -Encoding Byte -ReadCount 0))
50+
Import-RecipientDataProperty -Identity "Tony Smith" -SpokenName -FileData ([System.IO.File]::ReadAllBytes('M:\AudioFiles\TonySmith.wma'))
5151
```
5252

5353
This example imports the audio file for Tony Smith's spoken name.
5454

5555
### Example 2
5656
```powershell
57-
Import-RecipientDataProperty -Identity Ayla -Picture -FileData ([Byte[]]$(Get-Content -Path "M:\Employee Photos\AylaKol.jpg" -Encoding Byte -ReadCount 0))
57+
Import-RecipientDataProperty -Identity Ayla -Picture -FileData ([System.IO.File]::ReadAllBytes('M:\Employee Photos\AylaKol.jpg'))
5858
```
5959

6060
This example imports the picture file for Ayla Kol.

exchange/exchange-ps/exchange/Import-TransportRuleCollection.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,11 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4242

4343
### Example 1
4444
```powershell
45-
[Byte[]]$Data = Get-Content -Path "C:\TransportRules\ExportedRules.xml" -Encoding Byte -ReadCount 0
46-
Import-TransportRuleCollection -FileData $Data
45+
Import-TransportRuleCollection -FileData ([System.IO.File]::ReadAllBytes('C:\TransportRules\ExportedRules.xml'))
4746
```
4847

4948
This example imports a transport rule collection from the XML file named ExportedRules.xml in the C:\\TransportRules folder.
5049

51-
**Note**: In PowerShell 6.0 or later, replace `-Encoding Byte` with `-AsByteStream`.
52-
5350
## PARAMETERS
5451

5552
### -Identity

exchange/exchange-ps/exchange/Import-UMPrompt.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,24 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
6767

6868
### Example 1
6969
```powershell
70-
[byte[]]$c = Get-content -Path "d:\UMPrompts\welcomegreeting.wav" -Encoding Byte -ReadCount 0
71-
Import-UMPrompt -UMDialPlan MyUMDialPlan -PromptFileName "welcomegreeting.wav" -PromptFileData $c
70+
Import-UMPrompt -UMDialPlan MyUMDialPlan -PromptFileName "welcomegreeting.wav" -PromptFileData ([System.IO.File]::ReadAllBytes('D:\UMPrompts\welcomegreeting.wav'))
7271
```
7372

74-
This example imports the welcome greeting file welcomegreeting.wav from d:\\UMPrompts into the UM dial plan MyUMDialPlan.
73+
This example imports the welcome greeting file welcomegreeting.wav from D:\\UMPrompts into the UM dial plan MyUMDialPlan.
7574

7675
### Example 2
7776
```powershell
78-
[byte[]]$c = Get-content -Path "d:\UMPrompts\welcomegreeting.wav" -Encoding Byte -ReadCount 0
79-
Import-UMPrompt -UMAutoAttendant MyUMAutoAttendant -PromptFileName "welcomegreeting.wav" -PromptFileData $c
77+
Import-UMPrompt -UMAutoAttendant MyUMAutoAttendant -PromptFileName "welcomegreeting.wav" -PromptFileData ([System.IO.File]::ReadAllBytes('D:\UMPrompts\welcomegreeting.wav'))
8078
```
8179

82-
This example imports the welcome greeting file welcomegreeting.wav from d:\\UMPrompts into the UM auto attendant MyUMAutoAttendant.
80+
This example imports the welcome greeting file welcomegreeting.wav from D:\\UMPrompts into the UM auto attendant MyUMAutoAttendant.
8381

8482
### Example 3
8583
```powershell
86-
[byte[]]$c = Get-content -Path "d:\UMPrompts\AfterHoursWelcomeGreeting.wav" -Encoding Byte -ReadCount 0
87-
Import-UMPrompt -UMAutoAttendant MyUMAutoAttendant -PromptFileName "AfterHoursWelcomeGreeting.wav" -PromptFileData $c
84+
Import-UMPrompt -UMAutoAttendant MyUMAutoAttendant -PromptFileName "AfterHoursWelcomeGreeting.wav" -PromptFileData ([System.IO.File]::ReadAllBytes('D:\UMPrompts\AfterHoursWelcomeGreeting.wav'))
8885
```
8986

90-
This example imports the welcome greeting file AfterHoursWelcomeGreeting.wav from d:\\UMPrompts into the UM auto attendant MyUMAutoAttendant.
87+
This example imports the welcome greeting file AfterHoursWelcomeGreeting.wav from D:\\UMPrompts into the UM auto attendant MyUMAutoAttendant.
9188

9289
## PARAMETERS
9390

exchange/exchange-ps/exchange/New-ClassificationRuleCollection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
3737

3838
### Example 1
3939
```powershell
40-
New-ClassificationRuleCollection -FileData ([Byte[]]$(Get-Content -Path "C:\My Documents\External Classification Rule Collection.xml" -Encoding Byte -ReadCount 0))
40+
New-ClassificationRuleCollection -FileData ([System.IO.File]::ReadAllBytes('C:\My Documents\External Classification Rule Collection.xml'))
4141
```
4242

4343
This example imports the classification rule collection file C:\\My Documents\\External Classification Rule Collection.xml.

exchange/exchange-ps/exchange/New-DataClassification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4141

4242
### Example 1
4343
```powershell
44-
$Employee_Template = Get-Content "C:\My Documents\Contoso Employee Template.docx" -Encoding byte
44+
$Employee_Template = [System.IO.File]::ReadAllBytes('C:\My Documents\Contoso Employee Template.docx')
4545
$Employee_Fingerprint = New-Fingerprint -FileData $Employee_Template -Description "Contoso Employee Template"
46-
$Customer_Template = Get-Content "D:\Data\Contoso Customer Template.docx" -Encoding byte
46+
$Customer_Template = [System.IO.File]::ReadAllBytes('D:\Data\Contoso Customer Template.docx')
4747
$Customer_Fingerprint = New-Fingerprint -FileData $Customer_Template -Description "Contoso Customer Template"
4848
New-DataClassification -Name "Contoso Employee-Customer Confidential" -Fingerprints $Employee_Fingerprint,$Customer_Fingerprint -Description "Message contains Contoso employee or customer information."
4949
```

exchange/exchange-ps/exchange/New-DlpEdmSchema.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ To use this cmdlet in Security & Compliance Center PowerShell, you need to be as
3636

3737
### Example 1
3838
```powershell
39-
$edmSchemaXml = Get-Content "C:\My Documents\edm.xml" -Encoding Byte -ReadCount 0
40-
New-DlpEdmSchema -FileData $edmSchemaXml -Confirm:$true
39+
New-DlpEdmSchema -FileData ([System.IO.File]::ReadAllBytes('C:\My Documents\edm.xml')) -Confirm:$true
4140
```
4241

43-
This example creates a new DLP EDM schema. The first command reads the schema in the XML file to a variable, and the second command uses that information to create the DLP EDM schema.
42+
This example creates a new DLP EDM schema using the file named edm.xml in the folder C:\\My Documents.
4443

4544
## PARAMETERS
4645

exchange/exchange-ps/exchange/New-DlpSensitiveInformationType.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ To use this cmdlet in Security & Compliance Center PowerShell, you need to be as
3737

3838
### Example 1
3939
```powershell
40-
$Employee_Template = Get-Content "C:\My Documents\Contoso Employee Template.docx" -Encoding byte -ReadCount 0
40+
$Employee_Template = [System.IO.File]::ReadAllBytes('C:\My Documents\Contoso Employee Template.docx')
4141
$Employee_Fingerprint = New-DlpFingerprint -FileData $Employee_Template -Description "Contoso Employee Template"
42-
$Customer_Template = Get-Content "D:\Data\Contoso Customer Template.docx" -Encoding byte
42+
$Customer_Template = [System.IO.File]::ReadAllBytes('D:\Data\Contoso Customer Template.docx')
4343
$Customer_Fingerprint = New-DlpFingerprint -FileData $Customer_Template -Description "Contoso Customer Template"
4444
New-DlpSensitiveInformationType -Name "Contoso Employee-Customer Confidential" -Fingerprints $Employee_Fingerprint[0],$Customer_Fingerprint[0] -Description "Message contains Contoso employee or customer information."
4545
```

exchange/exchange-ps/exchange/New-DlpSensitiveInformationTypeRulePackage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To use this cmdlet in Security & Compliance Center PowerShell, you need to be as
3838
### Example 1
3939
```powershell
4040
41-
New-DlpSensitiveInformationTypeRulePackage -FileData ([Byte[]]$(Get-Content -Path "C:\My Documents\External Sensitive Info Type Rule Collection.xml" -Encoding Byte -ReadCount 0))
41+
New-DlpSensitiveInformationTypeRulePackage -FileData ([System.IO.File]::ReadAllBytes('C:\My Documents\External Sensitive Info Type Rule Collection.xml'))
4242
```
4343

4444
This example imports the sensitive information type rule package C:\\My Documents\\External Sensitive Info Type Rule Collection.xml.

exchange/exchange-ps/exchange/New-EdgeSubscription.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This example creates the Edge Subscription file. It should be run on your Edge T
5050

5151
### Example 2
5252
```powershell
53-
[byte[]]$Temp = Get-Content -Path "C:\EdgeServerSubscription.xml" -Encoding Byte -ReadCount 0
53+
$Temp = [System.IO.File]::ReadAllBytes('C:\EdgeServerSubscription.xml')
5454
New-EdgeSubscription -FileData $Temp -Site "Default-First-Site-Name"
5555
```
5656

@@ -60,7 +60,7 @@ The first command reads the data from the Edge Subscription file and stores it i
6060

6161
### Example 3
6262
```powershell
63-
New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path "C:\EdgeServerSubscription.xml" -Encoding Byte -ReadCount 0)) -Site "Default-First-Site-Name"
63+
New-EdgeSubscription -FileData ([System.IO.File]::ReadAllBytes('C:\EdgeServerSubscription.xml')) -Site "Default-First-Site-Name"
6464
```
6565

6666
This example also imports the Edge Subscription file generated in Example 1 to the Active Directory site Default-First-Site-Name; however, the end result is accomplished using one command. You must run this command on the Mailbox server.

exchange/exchange-ps/exchange/New-OMEConfiguration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4747

4848
### Example 1
4949
```powershell
50-
New-OMEConfiguration -Identity "Contoso Marketing" -EmailText "Encrypted message enclosed." -PortalText "This portal is encrypted." -DisclaimerText "Encryption security disclaimer." -Image (Get-Content "C:\Temp\OME Logo.gif" -Encoding byte)
50+
New-OMEConfiguration -Identity "Contoso Marketing" -EmailText "Encrypted message enclosed." -PortalText "This portal is encrypted." -DisclaimerText "Encryption security disclaimer." -Image ([System.IO.File]::ReadAllBytes('C:\Temp\OME Logo.gif'))
5151
```
5252

5353
This example creates a new OME configuration named "Contoso Marketing" with the specified values specified. Unused parameters get the default values.

0 commit comments

Comments
 (0)