New-CrescendoCommand
Creates a PowerShell command object.
Syntax
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.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OriginalName
The name of the native command executable to run.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Verb
The verb of the cmdlet you are defining.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Related Links
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.