Skip to content

Commit 50ba3a3

Browse files
ArieHeinmichaeltlombardi
authored andcommitted
Markdown and PS Styles
1 parent 360dc86 commit 50ba3a3

File tree

9 files changed

+97
-70
lines changed

9 files changed

+97
-70
lines changed

reference/5.1/ISE/Get-IseSnippet.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ Get-IseSnippet
4545

4646
### Example 2: Copy all user-defined snippets from remote computers to a shared directory
4747

48-
This example copies all of the user-created snippets from a group of remote computers to a shared Snippets directory.
48+
This example copies all of the user-created snippets from a group of remote computers to a shared
49+
Snippets directory.
4950

5051
```powershell
51-
Invoke-Command -Computer (Get-Content Servers.txt) {Get-IseSnippet | Copy-Item -Destination \\Server01\Share01\Snippets}
52+
Invoke-Command -Computer (Get-Content Servers.txt) -ScriptBlock {
53+
Get-IseSnippet | Copy-Item -Destination \\Server01\Share01\Snippets
54+
}
5255
```
5356

5457
`Invoke-Command` runs `Get-IseSnippet` on the computers in the `Servers.txt` file. A pipeline
@@ -57,8 +60,8 @@ that is specified by the **Destination** parameter.
5760

5861
### Example 3: Display the title and text of each snippet on a local computer
5962

60-
This example uses the `Get-IseSnippet` and `Select-Xml` cmdlets to display the title and text of each
61-
snippet on the local computer.
63+
This example uses the `Get-IseSnippet` and `Select-Xml` cmdlets to display the title and text of
64+
each snippet on the local computer.
6265

6366
```powershell
6467
#Parse-Snippet Function
@@ -93,7 +96,8 @@ Text: (c) Fabrikam, Inc. 2012
9396

9497
### Example 4: Display the title and description of all snippets in the session
9598

96-
This example displays the title and description of all snippets in the session, including built-in snippets, user-defined snippets, and imported snippets.
99+
This example displays the title and description of all snippets in the session, including built-in
100+
snippets, user-defined snippets, and imported snippets.
97101

98102
```powershell
99103
$PSISE.CurrentPowerShellTab.Snippets | Format-Table DisplayTitle, Description

reference/5.1/ISE/ISE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ that add features to Windows PowerShell ISE.
1919
## ISE Cmdlets
2020

2121
### [Get-IseSnippet](Get-IseSnippet.md)
22+
2223
Gets snippets that the user created.
2324

2425
### [Import-IseSnippet](Import-IseSnippet.md)
26+
2527
Imports ISE snippets into the current session
2628

2729
### [New-IseSnippet](New-IseSnippet.md)
30+
2831
Creates a Windows PowerShell ISE code snippet.

reference/5.1/ISE/Import-IseSnippet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ This example gets snippets in all installed modules in the **PSModulePath** envi
8080
```powershell
8181
($env:PSModulePath).split(";") |
8282
ForEach-Object {dir $_\*\Snippets\*.Snippets.ps1xml -ErrorAction SilentlyContinue} |
83-
ForEach-Object {$_.fullname}
83+
ForEach-Object {$_.Fullname}
8484
```
8585

8686
### Example 4: Import all module snippets

reference/5.1/ISE/New-IseSnippet.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Creates a Windows PowerShell ISE code snippet.
1515
## SYNTAX
1616

1717
```
18-
New-IseSnippet [-Title] <String> [-Description] <String> [-Text] <String> [-Author <String>]
19-
[-CaretOffset <Int32>] [-Force] [<CommonParameters>]
18+
New-IseSnippet [-Title] <String> [-Description] <String> [-Text] <String>
19+
[-Author <String>] [-CaretOffset <Int32>] [-Force] [<CommonParameters>]
2020
```
2121

2222
## DESCRIPTION
@@ -45,7 +45,7 @@ This cmdlet was introduced in Windows PowerShell 3.0.
4545

4646
### Example 1: Create a Comment-Based help snippet
4747

48-
```
48+
```powershell
4949
New-IseSnippet -Title Comment-BasedHelp -Description "A template for comment-based help." -Text "<#
5050
.SYNOPSIS
5151
@@ -64,7 +64,7 @@ This command creates a Comment-BasedHelp snippet for Windows PowerShell ISE. It
6464

6565
### Example 2: Create a mandatory snippet
6666

67-
```
67+
```powershell
6868
$M = @'
6969
Param
7070
(
@@ -74,7 +74,14 @@ Param
7474
)
7575
'@
7676
77-
New-ISESnippet -Text $M -Title Mandatory -Description "Adds a mandatory function parameter." -Author "Patti Fuller, Fabrikam Corp." -Force
77+
$snippet = @{
78+
Text = $M
79+
Title = 'Mandatory'
80+
Description = 'Adds a mandatory function parameter.'
81+
Author = 'Patti Fuller, Fabrikam Corp.'
82+
Force = $true
83+
}
84+
New-ISESnippet @snippet
7885
```
7986

8087
This example creates a snippet named **Mandatory** for Windows PowerShell ISE. The first command
@@ -84,8 +91,10 @@ the same name.
8491

8592
### Example 3: Copy a mandatory snippet from a folder to a destination folder
8693

87-
```
88-
Copy-Item "$HOME\Documents\WindowsPowerShell\Snippets\Mandatory.Snippets.ps1xml" -Destination "\\Server\Share"
94+
```powershell
95+
$path = "$HOME\Documents\WindowsPowerShell\Snippets\Mandatory.Snippets.ps1xml"
96+
$destination = "\\Server\Share"
97+
Copy-Item -Path $path -Destination $destination
8998
```
9099

91100
This command uses the `Copy-Item` cmdlet to copy the **Mandatory** snippet from the folder where
@@ -228,7 +237,8 @@ is created, but an error message appears when Windows PowerShell tries to add th
228237
snippet to the session. To use the new snippet (and other unsigned user-created snippets), change
229238
the execution policy, and then restart Windows PowerShell ISE.
230239

231-
For more information about Windows PowerShell execution policies, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
240+
For more information about Windows PowerShell execution policies, see
241+
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
232242

233243
- To change a snippet, edit the snippet file. You can edit snippet files in the Script pane of
234244
Windows PowerShell ISE.

reference/5.1/Microsoft.PowerShell.Archive/Compress-Archive.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,43 @@ Creates a compressed archive, or zipped file, from specified files and directori
1818
### Path (Default)
1919

2020
```
21-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
22-
[-WhatIf] [-Confirm] [<CommonParameters>]
21+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
22+
[-CompressionLevel <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
2323
```
2424

2525
### PathWithUpdate
2626

2727
```
28-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>] -Update
29-
[-WhatIf] [-Confirm] [<CommonParameters>]
28+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
29+
[-CompressionLevel <String>] -Update [-WhatIf] [-Confirm] [<CommonParameters>]
3030
```
3131

3232
### PathWithForce
3333

3434
```
35-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>] -Force
36-
[-WhatIf] [-Confirm] [<CommonParameters>]
35+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
36+
[-CompressionLevel <String>] -Force [-WhatIf] [-Confirm] [<CommonParameters>]
3737
```
3838

3939
### LiteralPathWithUpdate
4040

4141
```
42-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
43-
-Update [-WhatIf] [-Confirm] [<CommonParameters>]
42+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
43+
[-CompressionLevel <String>] -Update [-WhatIf] [-Confirm] [<CommonParameters>]
4444
```
4545

4646
### LiteralPathWithForce
4747

4848
```
49-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
50-
-Force [-WhatIf] [-Confirm] [<CommonParameters>]
49+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
50+
[-CompressionLevel <String>] -Force [-WhatIf] [-Confirm] [<CommonParameters>]
5151
```
5252

5353
### LiteralPath
5454

5555
```
56-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
57-
[-WhatIf] [-Confirm] [<CommonParameters>]
56+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
57+
[-CompressionLevel <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
5858
```
5959

6060
## DESCRIPTION
@@ -184,7 +184,8 @@ This example sends a directory down the pipeline to create an archive. Files are
184184
doesn't include the root directory, but its files and subdirectories are included in the archive.
185185

186186
```powershell
187-
Get-ChildItem -Path C:\LogFiles | Compress-Archive -DestinationPath C:\Archives\PipelineDir.zip
187+
Get-ChildItem -Path C:\LogFiles |
188+
Compress-Archive -DestinationPath C:\Archives\PipelineDir.zip
188189
```
189190

190191
`Get-ChildItem` uses the **Path** parameter to specify the `C:\LogFiles` root directory. Each

reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ Extracts files from a specified archive (zipped) file.
1818
### Path (Default)
1919

2020
```
21-
Expand-Archive [-Path] <String> [[-DestinationPath] <String>] [-Force] [-WhatIf] [-Confirm]
22-
[<CommonParameters>]
21+
Expand-Archive [-Path] <String> [[-DestinationPath] <String>] [-Force] [-WhatIf]
22+
[-Confirm] [<CommonParameters>]
2323
```
2424

2525
### LiteralPath
2626

2727
```
28-
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-WhatIf] [-Confirm]
29-
[<CommonParameters>]
28+
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-WhatIf]
29+
[-Confirm] [<CommonParameters>]
3030
```
3131

3232
## DESCRIPTION

reference/7.4/Microsoft.PowerShell.Archive/Compress-Archive.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,45 @@ Creates a compressed ZIP archive from specified files and directories.
1818
### Path (Default)
1919

2020
```
21-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
22-
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
22+
[-CompressionLevel <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
2323
```
2424

2525
### PathWithUpdate
2626

2727
```
28-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
29-
-Update [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
28+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
29+
[-CompressionLevel <String>] -Update [-PassThru] [-WhatIf] [-Confirm]
30+
[<CommonParameters>]
3031
```
3132

3233
### PathWithForce
3334

3435
```
35-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
36-
-Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
36+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
37+
[-CompressionLevel <String>] -Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
3738
```
3839

3940
### LiteralPathWithUpdate
4041

4142
```
42-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
43-
-Update [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
43+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
44+
[-CompressionLevel <String>] -Update [-PassThru] [-WhatIf] [-Confirm]
45+
[<CommonParameters>]
4446
```
4547

4648
### LiteralPathWithForce
4749

4850
```
49-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
50-
-Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
51+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
52+
[-CompressionLevel <String>] -Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
5153
```
5254

5355
### LiteralPath
5456

5557
```
56-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
57-
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
58+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
59+
[-CompressionLevel <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
5860
```
5961

6062
## DESCRIPTION
@@ -186,7 +188,8 @@ This example sends a directory down the pipeline to create an archive. Files are
186188
doesn't include the root directory, but its files and subdirectories are included in the archive.
187189

188190
```powershell
189-
Get-ChildItem -Path C:\LogFiles | Compress-Archive -DestinationPath C:\Archives\PipelineDir.zip
191+
Get-ChildItem -Path C:\LogFiles |
192+
Compress-Archive -DestinationPath C:\Archives\PipelineDir.zip
190193
```
191194

192195
`Get-ChildItem` uses the **Path** parameter to specify the `C:\LogFiles` root directory. Each

reference/7.5/Microsoft.PowerShell.Archive/Compress-Archive.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,45 @@ Creates a compressed archive, or zipped file, from specified files and directori
1818
### Path (Default)
1919

2020
```
21-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
22-
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
22+
[-CompressionLevel <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
2323
```
2424

2525
### PathWithUpdate
2626

2727
```
28-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
29-
-Update [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
28+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
29+
[-CompressionLevel <String>] -Update [-PassThru] [-WhatIf] [-Confirm]
30+
[<CommonParameters>]
3031
```
3132

3233
### PathWithForce
3334

3435
```
35-
Compress-Archive [-Path] <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
36-
-Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
36+
Compress-Archive [-Path] <String[]> [-DestinationPath] <String>
37+
[-CompressionLevel <String>] -Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
3738
```
3839

3940
### LiteralPathWithUpdate
4041

4142
```
42-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
43-
-Update [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
43+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
44+
[-CompressionLevel <String>] -Update [-PassThru] [-WhatIf] [-Confirm]
45+
[<CommonParameters>]
4446
```
4547

4648
### LiteralPathWithForce
4749

4850
```
49-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
50-
-Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
51+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
52+
[-CompressionLevel <String>] -Force [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
5153
```
5254

5355
### LiteralPath
5456

5557
```
56-
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-CompressionLevel <String>]
57-
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
58+
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String>
59+
[-CompressionLevel <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
5860
```
5961

6062
## DESCRIPTION
@@ -185,7 +187,8 @@ This example sends a directory down the pipeline to create an archive. Files are
185187
doesn't include the root directory, but its files and subdirectories are included in the archive.
186188

187189
```powershell
188-
Get-ChildItem -Path C:\LogFiles | Compress-Archive -DestinationPath C:\Archives\PipelineDir.zip
190+
Get-ChildItem -Path C:\LogFiles |
191+
Compress-Archive -DestinationPath C:\Archives\PipelineDir.zip
189192
```
190193

191194
`Get-ChildItem` uses the **Path** parameter to specify the `C:\LogFiles` root directory. Each

0 commit comments

Comments
 (0)