New-UsageInfo

Creates a PowerShell object representing a Crescendo Usage definition.

Syntax

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.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Object