New-UsageInfo
Creates a PowerShell object representing a Crescendo Usage definition.
Syntax
Default (Default)
New-UsageInfo
[-usage] <String>
[<CommonParameters>]
Description
Creates a PowerShell object representing a Crescendo Usage definition. You can assign values to the
properties of the object. The resulting object can be added to the Usage property of a command
object or it can be converted to JSON to be inserted in the configuration file. The Synopsis of
the object is inserted in the module as comment-based help under the .SYNOPSIS
keyword.
Examples
Example 1 - Create a Usage object and convert it to JSON
$usage = New-UsageInfo -usage 'This is a description for how to use the cmdlet.'
$usage | ConvertTo-Json
{
"Synopsis": "This is a description for how to use the cmdlet.",
"SupportsFlags": false,
"HasOptions": false,
"OriginalText": null
}
Parameters
-usage
The text describing the purpose of the cmdlet.
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 |
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.