Skip to content

Commit d3d2573

Browse files
committed
Added carriage returns
To multi-line PowerShell procedures.
1 parent fdb14b8 commit d3d2573

18 files changed

+98
-0
lines changed

exchange/exchange-ps/exchange/Export-Message.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ This example exports a single message to the specified file path. Because the Ex
4444
### Example 2
4545
```powershell
4646
Get-Message -Queue "Server1\contoso.com" -ResultSize Unlimited | ForEach-Object {Suspend-Message $_.Identity -Confirm:$False
47+
4748
$Temp="C:\ExportFolder\"+$_.InternetMessageID+".eml"
49+
4850
$Temp=$Temp.Replace("<","_")
51+
4952
$Temp=$Temp.Replace(">","_")
53+
5054
Export-Message $_.Identity | AssembleMessage -Path $Temp}
5155
```
5256

exchange/exchange-ps/exchange/Get-MapiVirtualDirectory.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ This example returns a summary list of the MAPI virtual directories on the serve
5353
### Example 2
5454
```powershell
5555
Get-MapiVirtualDirectory -Identity "ContosoMail\mapi (Default Web Site)" | Format-List
56+
5657
Get-MapiVirtualDirectory "ContosoMail\mapi (Default Web Site)" | Format-List
58+
5759
Get-MapiVirtualDirectory ContosoMai\mapi* | Format-List
5860
```
5961

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4242
### Example 1
4343
```powershell
4444
$Employee_Template = [System.IO.File]::ReadAllBytes('C:\My Documents\Contoso Employee Template.docx')
45+
4546
$Employee_Fingerprint = New-Fingerprint -FileData $Employee_Template -Description "Contoso Employee Template"
47+
4648
$Customer_Template = [System.IO.File]::ReadAllBytes('D:\Data\Contoso Customer Template.docx')
49+
4750
$Customer_Fingerprint = New-Fingerprint -FileData $Customer_Template -Description "Contoso Customer Template"
51+
4852
New-DataClassification -Name "Contoso Employee-Customer Confidential" -Fingerprints $Employee_Fingerprint,$Customer_Fingerprint -Description "Message contains Contoso employee or customer information."
4953
```
5054

exchange/exchange-ps/exchange/New-DlpKeywordDictionary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ To use this cmdlet in Security & Compliance PowerShell, you need to be assigned
4040
### Example 1
4141
```powershell
4242
$Keywords = @("Aarskog's syndrome","Abandonment","Abasia","Abderhalden-Kaufmann-Lignac","Abdominalgia","Abduction contracture","Abetalipo proteinemia","Abiotrophy","Ablatio","ablation","Ablepharia","Abocclusion","Abolition","Aborter","Abortion","Abortus","Aboulomania","Abrami's disease","Abramo")
43+
4344
$EncodedKeywords = $Keywords | ForEach-Object {[System.Text.Encoding]::Unicode.GetBytes($_+"`r`n")}
45+
4446
New-DlpKeywordDictionary -Name "Diseases" -Description "Names of diseases and injuries from ICD-10-CM lexicon" -FileData $EncodedKeywords
4547
```
4648

@@ -49,7 +51,9 @@ This example creates a DLP keyword dictionary named Diseases by using the specif
4951
### Example 2
5052
```powershell
5153
$Keywords = Get-Content "C:\My Documents\InappropriateTerms.txt"
54+
5255
$EncodedKeywords = $Keywords | ForEach-Object {[System.Text.Encoding]::Unicode.GetBytes($_+"`r`n")}
56+
5357
New-DlpKeywordDictionary -Name "Inappropriate Language" -Description "Unprofessional and inappropriate terminology" -FileData $EncodedKeywords
5458
```
5559

exchange/exchange-ps/exchange/New-Mailbox.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,9 @@ This example creates an enabled user account in Active Directory and a room mail
794794
### Example 4
795795
```powershell
796796
New-Mailbox -Shared -Name "Sales Department" -DisplayName "Sales Department" -Alias Sales
797+
797798
Set-Mailbox -Identity Sales -GrantSendOnBehalfTo MarketingSG
799+
798800
Add-MailboxPermission -Identity Sales -User MarketingSG -AccessRights FullAccess -InheritanceType All
799801
```
800802

exchange/exchange-ps/exchange/New-MigrationBatch.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,11 @@ This example creates a migration batch for a local move, where the mailboxes in
298298
### Example 2
299299
```powershell
300300
$Credentials = Get-Credential
301+
301302
$MigrationEndpointSource = New-MigrationEndpoint -ExchangeRemoteMove -Name Forest1Endpoint -Autodiscover -EmailAddress [email protected] -Credentials $Credentials
303+
302304
$CrossForestBatch = New-MigrationBatch -Name CrossForestBatch1 -SourceEndpoint $MigrationEndpointSource.Identity -TargetDeliveryDomain forest2.contoso.com -TargetDatabases MBXDB1 -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\CrossForestBatch1.csv"))
305+
303306
Start-MigrationBatch -Identity $CrossForestBatch.Identity
304307
```
305308

@@ -308,8 +311,11 @@ This example creates a migration batch for a cross-forest enterprise move, where
308311
### Example 3
309312
```powershell
310313
$Credentials = Get-Credential
314+
311315
$MigrationEndpointOnPrem = New-MigrationEndpoint -ExchangeRemoteMove -Name OnpremEndpoint -Autodiscover -EmailAddress [email protected] -Credentials $Credentials
316+
312317
$OnboardingBatch = New-MigrationBatch -Name RemoteOnBoarding1 -SourceEndpoint $MigrationEndpointOnprem.Identity -TargetDeliveryDomain contoso.mail.onmicrosoft.com -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\RemoteOnBoarding1.csv"))
318+
313319
Start-MigrationBatch -Identity $OnboardingBatch.Identity.Name
314320
```
315321

@@ -318,8 +324,11 @@ This example creates a migration batch for an onboarding remote move migration f
318324
### Example 4
319325
```powershell
320326
$Credentials = Get-Credential
327+
321328
$MigrationEndpointOnPrem = New-MigrationEndpoint -ExchangeRemoteMove -Name OnpremEndpoint -Autodiscover -EmailAddress [email protected] -Credentials $Credentials
329+
322330
$OffboardingBatch = New-MigrationBatch -Name RemoteOffBoarding1 -TargetEndpoint $MigrationEndpointOnprem.Identity -TargetDeliveryDomain onprem.contoso.com -TargetDatabases @(MBXDB01,MBXDB02,MBXDB03) -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\RemoteOffBoarding1.csv"))
331+
323332
Start-MigrationBatch -Identity $OffboardingBatch.Identity
324333
```
325334

@@ -328,7 +337,9 @@ This example creates a migration batch for an offboarding remote move migration
328337
### Example 5
329338
```powershell
330339
$credentials = Get-Credential
340+
331341
$SourceEndpoint = New-MigrationEndpoint -ExchangeOutlookAnywhere -Autodiscover -Name SourceEndpoint -EmailAddress [email protected] -Credentials $credentials
342+
332343
New-MigrationBatch -Name CutoverBatch -SourceEndpoint $SourceEndpoint.Identity -TimeZone "Pacific Standard Time" -AutoStart
333344
```
334345

@@ -337,8 +348,11 @@ This example creates a migration batch for the cutover Exchange migration Cutove
337348
### Example 6
338349
```powershell
339350
$Credentials = Get-Credential
351+
340352
$MigrationEndpoint = New-MigrationEndpoint -ExchangeOutlookAnywhere -Name ContosoEndpoint -Autodiscover -EmailAddress [email protected] -Credentials $Credentials
353+
341354
$StagedBatch1 = New-MigrationBatch -Name StagedBatch1 -SourceEndpoint $MigrationEndpoint.Identity -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\StagedBatch1.csv"))
355+
342356
Start-MigrationBatch -Identity $StagedBatch1.Identity
343357
```
344358

@@ -356,8 +370,11 @@ This example creates a migration endpoint for the connection settings to the IMA
356370
### Example 8
357371
```powershell
358372
$Credentials = Get-Credential
373+
359374
$MigrationEndpointOnPrem = New-MigrationEndpoint -ExchangeRemoteMove -Name OnpremEndpoint -Autodiscover -EmailAddress [email protected] -Credentials $Credentials
375+
360376
$OnboardingBatch = New-MigrationBatch -Name RemoteOnBoarding1 -SourceEndpoint $MigrationEndpointOnprem.Identity -TargetDeliveryDomain contoso.mail.onmicrosoft.com -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\RemoteOnBoarding1.csv")) -CompleteAfter "09/01/2018 7:00 PM"
377+
361378
Start-MigrationBatch -Identity $OnboardingBatch.Identity
362379
```
363380

@@ -366,8 +383,11 @@ This example is the same as Example 3, but the CompleteAfter parameter is also u
366383
### Example 9
367384
```powershell
368385
$Credentials = Get-Credential
386+
369387
$MigrationEndpointOnPrem = New-MigrationEndpoint -ExchangeRemoteMove -Name OnpremEndpoint -Autodiscover -EmailAddress [email protected] -Credentials $Credentials
388+
370389
$OnboardingBatch = New-MigrationBatch -Name RemoteOnBoarding1 -SourceEndpoint $MigrationEndpointOnprem.Identity -TargetDeliveryDomain contoso.mail.onmicrosoft.com -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\RemoteOnBoarding1.csv")) -CompleteAfter "09/01/2018 7:00 PM" -TimeZone "Pacific Standard Time"
390+
371391
Start-MigrationBatch -Identity $OnboardingBatch.Identity
372392
```
373393

@@ -376,9 +396,11 @@ This example is the same as Example 8, but the TimeZone parameter is also used.
376396
### Example 10
377397
```powershell
378398
$MigrationEndpointGmail = New-MigrationEndpoint -Gmail -ServiceAccountKeyFileData $([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\gmailonboarding.json")) -EmailAddress [email protected] -Name GmailEndpoint
399+
379400
$OnboardingBatch = New-MigrationBatch -SourceEndpoint $MigrationEndpointGmail.Identity -Name GmailBatch1 -CSVData $([System.IO.File]::ReadAll
380401
Bytes("C:\Users\Administrator\Desktop\gmail.csv")) -TargetDeliveryDomain "o365.contoso.com" -ContentFilter "Received -ge '2019/4/30'" -Inc
381402
ludeFolders "Payment"
403+
382404
Start-MigrationBatch -Identity $OnboardingBatch.Identity
383405
```
384406

exchange/exchange-ps/exchange/New-SafeLinksRule.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ This example creates a Safe Links rule named Contoso All with the following cond
7676
### Example 3
7777
```powershell
7878
$Data = Import-Csv -Path "C:\Data\SafeLinksDomains.csv"
79+
7980
$SLDomains = $Data.Domains
81+
8082
New-SafeLinksRule -Name "Contoso All" -SafeLinksPolicy "Contoso All" -RecipientDomainIs $SLDomains
8183
```
8284

exchange/exchange-ps/exchange/Remove-RoleAssignmentPolicy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4444
### Example 1
4545
```powershell
4646
Get-Mailbox | Where {$_.RoleAssignmentPolicy -Eq "End User"}
47+
4748
Get-Mailbox | Where {$_.RoleAssignmentPolicy -Eq "End User"} | Set-Mailbox -RoleAssignmentPolicy "Seattle End User"
49+
4850
Get-ManagementRoleAssignment -RoleAssignee "End User" | Remove-ManagementRoleAssignment
51+
4952
Remove-RoleAssignmentPolicy "End User"
5053
```
5154

exchange/exchange-ps/exchange/Remove-ThrottlingPolicy.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ This example removes the user throttling policy ClientThrottlingPolicy2.
4848
### Example 2
4949
```powershell
5050
$policy = Get-ThrottlingPolicy ClientThrottlingPolicy2
51+
5152
$mailboxes = Get-Mailbox | where-object {$_.ThrottlingPolicy -eq $policy.Identity}
53+
5254
$defaultPolicy = Get-ThrottlingPolicy | where-object {$_.IsDefault -eq $true}
55+
5356
foreach ($mailbox in $mailboxes) {Set-Mailbox -Identity $mailbox.Identity -ThrottlingPolicy $defaultPolicy}
57+
5458
Remove-ThrottlingPolicy ClientThrottlingPolicy2
5559
```
5660

exchange/exchange-ps/exchange/Set-ActivityAlert.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ To use this cmdlet in Security & Compliance PowerShell, you need to be assigned
4949
### Example 1
5050
```powershell
5151
$NU = Get-ActivityAlert "Contoso Elevation of Privilege"
52+
5253
$NU.NotifyUser.Add("[email protected]")
54+
5355
Set-ActivityAlert "Contoso Elevation of Privilege" -NotifyUser $NU.NotifyUser
5456
```
5557

0 commit comments

Comments
 (0)