< Back

ConvertTo-MAML

Tue Jan 14, 2020 12:56 am

NAME ConvertTo-MAML



SYNOPSIS

Converts command help to MAML





SYNTAX

ConvertTo-MAML [-Compact <Switch>] [-XML <Switch>] [-NoVersion <Switch>] [<CommonParameters>]



ConvertTo-MAML [[-Name] <System.String[]>] [-Compact <Switch>] [-XML <Switch>] [-NoVersion <Switch>]

[<CommonParameters>]



ConvertTo-MAML [-Module <System.String[]>] [-Compact <Switch>] [-XML <Switch>] [-NoVersion <Switch>]

[<CommonParameters>]



ConvertTo-MAML -CommandInfo <System.Management.Automation.CommandInfo[]> [-Compact <Switch>] [-XML <Switch>]

[-NoVersion <Switch>] [<CommonParameters>]





DESCRIPTION

Converts command help to MAML (Microsoft Assistance Markup Language).





PARAMETERS

-CommandInfo [<System.Management.Automation.CommandInfo[]>]

The CommandInfo object (returned from Get-Command).



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Compact [<Switch>]

If set, the generated MAML will be compact (no extra whitespace or indentation). If not set, the MAML will be

indented.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Module [<System.String[]>]

The name of one or more modules.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Name [<System.String[]>]

The name of or more commands.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-NoVersion [<Switch>]

If set, the generate MAML will not contain a version number.

This slightly reduces the size of the MAML file, and reduces the rate of changes in the MAML file.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-XML [<Switch>]

If set, will return the MAML as an XmlDocument. The default is to return the MAML as a string.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

[String]

The MAML, as a String. This is the default.



[Xml]

The MAML, as an XmlDocument (when -XML is passed in)





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>ConvertTo-Maml -Name ConvertTo-Maml



-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-Command ConvertTo-Maml | ConvertTo-Maml



-------------------------- EXAMPLE 3 --------------------------



PS C:\\>ConvertTo-Maml -Name ConvertTo-Maml -Compact



-------------------------- EXAMPLE 4 --------------------------



PS C:\\>ConvertTo-Maml -Name ConvertTo-Maml -XML





RELATED LINKS

Get-Help

Save-MAML