Edit

Share via


New-CrescendoCommand

Creates a PowerShell command object.

Syntax

Default (Default)

New-CrescendoCommand
    [-Verb] <String>
    [-Noun] <String>
    [[-OriginalName] <String>]
    [<CommonParameters>]

Description

Creates a PowerShell command object. You can use this object to set the properties of the command you are defining. The resulting object can be converted to JSON to be added to a configuration file.

Examples

Example 1 - Create a new command and convert it to JSON

New-CrescendoCommand -Verb Get -Noun Something -OriginalName "native.exe" | ConvertTo-Json
{
  "Verb": "Get",
  "Noun": "Something",
  "OriginalName": "native.exe",
  "OriginalCommandElements": null,
  "Platform": [
    "Windows",
    "Linux",
    "MacOS"
  ],
  "Elevation": null,
  "Aliases": null,
  "DefaultParameterSetName": null,
  "SupportsShouldProcess": false,
  "ConfirmImpact": null,
  "SupportsTransactions": false,
  "NoInvocation": false,
  "Description": null,
  "Usage": null,
  "Parameters": [],
  "Examples": [],
  "OriginalText": null,
  "HelpLinks": null,
  "OutputHandlers": null,
  "FunctionName": "Get-Something"
}

Parameters

-Noun

The noun of the cmdlet you are defining.

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

-OriginalName

The name of the native command executable to run.

Parameter properties

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

Parameter sets

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

-Verb

The verb of the cmdlet you are defining.

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.

Inputs

None

Outputs

Object