Skip to content

Commit e9be797

Browse files
committed
1 parent a744ac1 commit e9be797

File tree

5 files changed

+105
-109
lines changed

5 files changed

+105
-109
lines changed

reference/3.0/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
ms.date: 06/09/2017
33
schema: 2.0.0
44
keywords: powershell,cmdlet
@@ -7,7 +7,6 @@ title: about_Comment_Based_Help
77
# About Comment Based Help
88

99
## SHORT DESCRIPTION
10-
1110
Describes how to write comment-based help topics for functions and scripts.
1211

1312
## LONG DESCRIPTION
@@ -100,7 +99,7 @@ function Get-Function
10099
<help content>
101100
#>
102101
103-
<function commands>
102+
# function logic
104103
}
105104
```
106105

@@ -109,7 +108,7 @@ or
109108
```powershell
110109
function Get-Function
111110
{
112-
<function commands>
111+
# function logic
113112
114113
<#
115114
.<help keyword>
@@ -285,8 +284,8 @@ Redirects to the help topic for the specified command. You can redirect users
285284
to any help topic, including help topics for a function, script, cmdlet, or
286285
provider.
287286

288-
```
289-
.FORWARDHELPTARGETNAME <Command-Name>
287+
```powershell
288+
# .FORWARDHELPTARGETNAME <Command-Name>
290289
```
291290

292291
### .FORWARDHELPCATEGORY
@@ -296,8 +295,8 @@ values are "Alias", "Cmdlet", "HelpFile", "Function", "Provider", "General",
296295
"FAQ", "Glossary", "ScriptCommand", "ExternalScript", "Filter", or "All". Use
297296
this keyword to avoid conflicts when there are commands with the same name.
298297

299-
```
300-
.FORWARDHELPCATEGORY <Category>
298+
```powershell
299+
# .FORWARDHELPCATEGORY <Category>
301300
```
302301

303302
### .REMOTEHELPRUNSPACE
@@ -307,16 +306,16 @@ contains a "PSSession". This keyword is used by the
307306
[Export-PSSession](../../Microsoft.PowerShell.Utility/Export-PSSession.md)
308307
cmdlet to find the help topics for the exported commands.
309308

310-
```
311-
.REMOTEHELPRUNSPACE <PSSession-variable>
309+
```powershell
310+
# .REMOTEHELPRUNSPACE <PSSession-variable>
312311
```
313312

314313
### .EXTERNALHELP
315314

316315
Specifies an XML-based help file for the script or function.
317316

318-
```
319-
.EXTERNALHELP <XML Help File>
317+
```powershell
318+
# .EXTERNALHELP <XML Help File>
320319
```
321320

322321
The "ExternalHelp" keyword is required when a function or script is documented
@@ -440,17 +439,17 @@ or file name.
440439
441440
.EXAMPLE
442441
443-
PS> extension -name "File"
442+
C:\PS> extension -name "File"
444443
File.txt
445444
446445
.EXAMPLE
447446
448-
PS> extension -name "File" -extension "doc"
447+
C:\PS> extension -name "File" -extension "doc"
449448
File.doc
450449
451450
.EXAMPLE
452451
453-
PS> extension "File" "doc"
452+
C:\PS> extension "File" "doc"
454453
File.doc
455454
456455
.LINK
@@ -470,7 +469,7 @@ The results are as follows:
470469
Get-Help -Name "Add-Extension" -Full
471470
```
472471

473-
```
472+
```Output
474473
NAME
475474
476475
Add-Extension
@@ -525,17 +524,17 @@ file name.
525524
526525
Example 1
527526
528-
PS> extension -name "File"
527+
C:\PS> extension -name "File"
529528
File.txt
530529
531530
Example 2
532531
533-
PS> extension -name "File" -extension "doc"
532+
C:\PS> extension -name "File" -extension "doc"
534533
File.doc
535534
536535
Example 3
537536
538-
PS> extension "File" "doc"
537+
C:\PS> extension "File" "doc"
539538
File.doc
540539
541540
RELATED LINKS
@@ -589,17 +588,17 @@ file name.
589588
590589
.EXAMPLE
591590
592-
PS> extension -name "File"
591+
C:\PS> extension -name "File"
593592
File.txt
594593
595594
.EXAMPLE
596595
597-
PS> extension -name "File" -extension "doc"
596+
C:\PS> extension -name "File" -extension "doc"
598597
File.doc
599598
600599
.EXAMPLE
601600
602-
PS> extension "File" "doc"
601+
C:\PS> extension "File" "doc"
603602
File.doc
604603
605604
.LINK
@@ -651,15 +650,15 @@ None. Update-Month.ps1 does not generate any output.
651650
652651
.EXAMPLE
653652
654-
PS> .\Update-Month.ps1
653+
C:\PS> .\Update-Month.ps1
655654
656655
.EXAMPLE
657656
658-
PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv
657+
C:\PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv
659658
660659
.EXAMPLE
661660
662-
PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv -outputPath `
661+
C:\PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv -outputPath `
663662
C:\Reports\2009\January.csv
664663
#>
665664
@@ -677,7 +676,7 @@ command that gets the script help must specify the script path.
677676
Get-Help -Path .\update-month.ps1 -Full
678677
```
679678

680-
```
679+
```Output
681680
# NAME
682681
683682
C:\ps-test\Update-Month.ps1
@@ -734,15 +733,15 @@ None. Update-Month.ps1 does not generate any output.
734733
735734
Example 1
736735
737-
PS> .\Update-Month.ps1
736+
C:\PS> .\Update-Month.ps1
738737
739738
Example 2
740739
741-
PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv
740+
C:\PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv
742741
743742
Example 3
744743
745-
PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv -outputPath
744+
C:\PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv -outputPath
746745
C:\Reports\2009\January.csv
747746
748747
# RELATED LINKS
@@ -762,7 +761,7 @@ Note that the value of the "ExternalHelp" keyword appears on the same
762761
line as the keyword. Any other placement is ineffective.
763762

764763
```powershell
765-
.ExternalHelp C:\MyScripts\Update-Month-Help.xml
764+
# .ExternalHelp C:\MyScripts\Update-Month-Help.xml
766765
767766
param ([string]$InputPath, [string]$OutPutPath)
768767
function Get-Data { }
@@ -775,7 +774,7 @@ keyword in a function.
775774
```powershell
776775
function Add-Extension
777776
{
778-
.ExternalHelp C:\ps-test\Add-Extension.xml
777+
# .ExternalHelp C:\ps-test\Add-Extension.xml
779778
780779
param ([string] $name, [string]$extension = "txt")
781780
$name = $name + "." + $extension
@@ -790,12 +789,12 @@ param ([string] $name, [string]$extension = "txt")
790789
$name = $name + "." + $extension
791790
$name
792791
793-
.ExternalHelp C:\ps-test\Add-Extension.xml
792+
# .ExternalHelp C:\ps-test\Add-Extension.xml
794793
}
795794
```
796795

797796
```powershell
798-
.ExternalHelp C:\ps-test\Add-Extension.xml
797+
# .ExternalHelp C:\ps-test\Add-Extension.xml
799798
function Add-Extension
800799
{
801800
param ([string] $name, [string]$extension = "txt")
@@ -835,14 +834,14 @@ The following command uses this feature:
835834
Get-Help -Name help
836835
```
837836

838-
```
837+
```Output
839838
NAME
840839
841840
Get-Help
842841
843842
SYNOPSIS
844843
845-
Displays information about Windows PowerShell cmdlets and concepts.
844+
Displays information about PowerShell cmdlets and concepts.
846845
...
847846
```
848847

reference/4.0/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ title: about_Comment_Based_Help
77
# About Comment Based Help
88

99
## SHORT DESCRIPTION
10-
1110
Describes how to write comment-based help topics for functions and scripts.
1211

1312
## LONG DESCRIPTION
@@ -100,7 +99,7 @@ function Get-Function
10099
<help content>
101100
#>
102101
103-
<function commands>
102+
# function logic
104103
}
105104
```
106105

@@ -109,7 +108,7 @@ or
109108
```powershell
110109
function Get-Function
111110
{
112-
<function commands>
111+
# function logic
113112
114113
<#
115114
.<help keyword>
@@ -285,8 +284,8 @@ Redirects to the help topic for the specified command. You can redirect users
285284
to any help topic, including help topics for a function, script, cmdlet, or
286285
provider.
287286

288-
```
289-
.FORWARDHELPTARGETNAME <Command-Name>
287+
```powershell
288+
# .FORWARDHELPTARGETNAME <Command-Name>
290289
```
291290

292291
### .FORWARDHELPCATEGORY
@@ -296,8 +295,8 @@ values are "Alias", "Cmdlet", "HelpFile", "Function", "Provider", "General",
296295
"FAQ", "Glossary", "ScriptCommand", "ExternalScript", "Filter", or "All". Use
297296
this keyword to avoid conflicts when there are commands with the same name.
298297

299-
```
300-
.FORWARDHELPCATEGORY <Category>
298+
```powershell
299+
# .FORWARDHELPCATEGORY <Category>
301300
```
302301

303302
### .REMOTEHELPRUNSPACE
@@ -307,16 +306,16 @@ contains a "PSSession". This keyword is used by the
307306
[Export-PSSession](../../Microsoft.PowerShell.Utility/Export-PSSession.md)
308307
cmdlet to find the help topics for the exported commands.
309308

310-
```
311-
.REMOTEHELPRUNSPACE <PSSession-variable>
309+
```powershell
310+
# .REMOTEHELPRUNSPACE <PSSession-variable>
312311
```
313312

314313
### .EXTERNALHELP
315314

316315
Specifies an XML-based help file for the script or function.
317316

318-
```
319-
.EXTERNALHELP <XML Help File>
317+
```powershell
318+
# .EXTERNALHELP <XML Help File>
320319
```
321320

322321
The "ExternalHelp" keyword is required when a function or script is documented
@@ -470,7 +469,7 @@ The results are as follows:
470469
Get-Help -Name "Add-Extension" -Full
471470
```
472471

473-
```
472+
```Output
474473
NAME
475474
476475
Add-Extension
@@ -677,7 +676,7 @@ command that gets the script help must specify the script path.
677676
Get-Help -Path .\update-month.ps1 -Full
678677
```
679678

680-
```
679+
```Output
681680
# NAME
682681
683682
C:\ps-test\Update-Month.ps1
@@ -762,7 +761,7 @@ Note that the value of the "ExternalHelp" keyword appears on the same
762761
line as the keyword. Any other placement is ineffective.
763762

764763
```powershell
765-
.ExternalHelp C:\MyScripts\Update-Month-Help.xml
764+
# .ExternalHelp C:\MyScripts\Update-Month-Help.xml
766765
767766
param ([string]$InputPath, [string]$OutPutPath)
768767
function Get-Data { }
@@ -775,7 +774,7 @@ keyword in a function.
775774
```powershell
776775
function Add-Extension
777776
{
778-
.ExternalHelp C:\ps-test\Add-Extension.xml
777+
# .ExternalHelp C:\ps-test\Add-Extension.xml
779778
780779
param ([string] $name, [string]$extension = "txt")
781780
$name = $name + "." + $extension
@@ -790,12 +789,12 @@ param ([string] $name, [string]$extension = "txt")
790789
$name = $name + "." + $extension
791790
$name
792791
793-
.ExternalHelp C:\ps-test\Add-Extension.xml
792+
# .ExternalHelp C:\ps-test\Add-Extension.xml
794793
}
795794
```
796795

797796
```powershell
798-
.ExternalHelp C:\ps-test\Add-Extension.xml
797+
# .ExternalHelp C:\ps-test\Add-Extension.xml
799798
function Add-Extension
800799
{
801800
param ([string] $name, [string]$extension = "txt")
@@ -835,14 +834,14 @@ The following command uses this feature:
835834
Get-Help -Name help
836835
```
837836

838-
```
837+
```Output
839838
NAME
840839
841840
Get-Help
842841
843842
SYNOPSIS
844843
845-
Displays information about Windows PowerShell cmdlets and concepts.
844+
Displays information about PowerShell cmdlets and concepts.
846845
...
847846
```
848847

0 commit comments

Comments
 (0)