Compare-CommandHelp
Compares two CommandHelp objects and produces a detailed report showing the differences.
Syntax
__AllParameterSets
Compare-CommandHelp
[-ReferenceCommandHelp] <CommandHelp>
[-DifferenceCommandHelp] <CommandHelp>
[-PropertyNamesToExclude <string[]>]
[<CommonParameters>]
Description
Compare-CommandHelp is a troubleshooting tool that compares two CommandHelp objects and produces a
detailed report showing the differences. For example, you can use this to compare objects imported
from different sources, such as two different versions of Markdown files.
Examples
Example 1
$refcmd = Import-MarkdownCommandHelp -Path .\v1\Microsoft.PowerShell.PlatyPS\Compare-CommandHelp.md
$diffcmd = Import-MarkdownCommandHelp -Path .\v2\Microsoft.PowerShell.PlatyPS\Compare-CommandHelp.md
Compare-CommandHelp -ReferenceCommandHelp $refcmd -DifferenceCommandHelp $diffcmd > .\diff.log
Parameters
-DifferenceCommandHelp
The CommandHelp object to compare against the reference object.
Parameter properties
| Type: | Microsoft.PowerShell.PlatyPS.Model.CommandHelp |
| 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: | True |
| Value from remaining arguments: | False |
-PropertyNamesToExclude
A list of one or more property names to exclude from the comparison.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ReferenceCommandHelp
The base CommandHelp object to be compared to the difference object.
Parameter properties
| Type: | Microsoft.PowerShell.PlatyPS.Model.CommandHelp |
| 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: | True |
| 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.