共用方式為


Merge-MarkdownHelp

Merge multiple markdown versions of the same cmdlet into a single markdown file.

語法

Default (預設值)

Merge-MarkdownHelp
    [-Path] <String[]>
    [-OutputPath] <String>
    [-Encoding <Encoding>]
    [-ExplicitApplicableIfAll]
    [-Force]
    [[-MergeMarker] <String>]
    [<CommonParameters>]

Description

Similar modules, or different versions of the same module, often contain duplicate content.

Merge-MarkdownHelp merges the multiple markdown files into a single markdown file. It uses the applicable: yaml metadata field to identify what versions or tags are applicable. It acts on two levels: for the whole cmdlet and for individual parameters.

The resulting markdown contains the applicable: tags as well as all of the content of the original markdown files. Duplicate content is simply ignored. Content that is unique to each file is merged using merge markers, followed by a comma-separated list of applicable tags. A merge marker is a string of text that acts as a marker to describe the content that was merged. The default merge marker text consists of three exclamation points !!! however this can be changed to any relevant text using the -MergeMarker flag.

範例

Example 1

The Test-CsPhoneBootstrap.md cmdlet is included in both Lync Server 2010 and Lync Server 2013. Much of the content is duplicated and thus we want to have a single file for the cmdlet with unique content merged from each individual file.

Merge-MarkdownHelp -Path @('Lync Server 2010\Test-CsPhoneBootstrap.md', 'Lync Server 2013\Test-CsPhoneBootstrap.md') -OutputPath lync

The resulting file will be located at lync\Test-CsPhoneBootstrap.md.

參數

-Encoding

Specifies the character encoding for your external help file. Specify a System.Text.Encoding object. For more information, see about_Character_Encoding.

參數屬性

類型:Encoding
預設值:UTF8 without BOM
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ExplicitApplicableIfAll

Always write out full list of applicable tags. By default cmdlets and parameters that are present in all variations don't get an application tag.

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Force

Indicates that this cmdlet overwrites an existing file that has the same name.

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-MergeMarker

String to be used as a merge text indicator. Applicable tag list would be included after the marker

參數屬性

類型:String
預設值:!!!
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:3
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-OutputPath

Specifies the path of the folder where this cmdlet creates the combined markdown help files.

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:1
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Path

Specifies an array of paths of markdown files or folders. This cmdlet creates combined markdown help based on these files and folders.

參數屬性

類型:

String[]

預設值:None
支援萬用字元:True
不要顯示:False

參數集

(All)
Position:0
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

輸入

String

輸出

FileInfo