Edit

Share via


New-HelpCabinetFile

Creates a help cabinet file for a module that can be published as updateable help content.

Syntax

__AllParameterSets

New-HelpCabinetFile
    [-CabinetFilesFolder] <string>
    [-MarkdownModuleFile] <string>
    [-OutputFolder] <string>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

This cmdlet create .cab and .zip files that contain help files for a module.

Note

This cmdlet depends on the MakeCab.exe native command, which is only available on Windows. This cmdlet raises an error if used on non-Windows machines.

This cmdlet uses metadata stored in the module Markdown file to name your .cab and .zip files. This naming matches the pattern that the PowerShell help system requires for use as updatable help.

This cmdlet also generates or updates an existing Helpinfo.xml file. That file provides versioning and locale details to the PowerShell help system.

Examples

Example 1 - Create updateable help files for a module

$params = @{
    CabinetFilesFolder = '.\maml\Microsoft.PowerShell.PlatyPS'
    MarkdownModuleFile = '.\Microsoft.PowerShell.PlatyPS\Microsoft.PowerShell.PlatyPS.md'
    OutputFolder       = '.\cab'
}
New-HelpCabinetFile @params

Parameters

-CabinetFilesFolder

The path to the folder containing the MAML file to be packaged.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MarkdownModuleFile

Specifies the full path of the module Markdown file.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputFolder

The location where you want to write the .cab, .zip, and HelpInfo.xml files.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Outputs

FileInfo

The FileInfo objects that represent the files created by this cmdlet.