Import-CommandConfiguration

Import a PowerShell Crescendo json file.

Syntax

Import-CommandConfiguration
      [-file] <String>
      [<CommonParameters>]

Description

This cmdlet exports an object that can be converted into a function that acts as a proxy for the platform specific command. The resultant object may then be used to call a native command that can participate in the PowerShell pipeline. The ToString method of the output object returns a string that can be used to create a function that calls the native command. Microsoft Windows, Linux, and macOS can run the generated function, if the native command is on all platforms.

Examples

EXAMPLE 1

Import-CommandConfiguration ifconfig.crescendo.json

Verb                    : Invoke
Noun                    : ifconfig
OriginalName            : ifconfig
OriginalCommandElements :
Aliases                 :
DefaultParameterSetName :
SupportsShouldProcess   : False
SupportsTransactions    : False
NoInvocation            : False
Description             : This is a description of the generated function
Usage                   : .SYNOPSIS
                          Run invoke-ifconfig
Parameters              : {[Parameter()]
                          [string]$Interface = ""}
Examples                :
OriginalText            :
HelpLinks               :
OutputHandlers          :

Parameters

-file

The JSON file that represents the command to be wrapped.

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

Inputs

None

Outputs

A Command object

Notes

The object returned by Import-CommandConfiguration is converted through the ToString method. Generally, you should use the Export-CrescendoModule to create a PowerShell .psm1 file.