다음을 통해 공유


Import-CommandConfiguration

PowerShell Crescendo json 파일을 가져옵니다.

구문

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

Description

이 cmdlet은 플랫폼별 명령에 대한 프록시 역할을 하는 함수로 변환할 수 있는 개체를 내보냅니다. 그런 다음 결과 개체를 사용하여 PowerShell 파이프라인에 참여할 수 있는 네이티브 명령을 호출할 수 있습니다. 출력 개체의 ToString 메서드는 네이티브 명령을 호출하는 함수를 만드는 데 사용할 수 있는 문자열을 반환합니다. 네이티브 명령이 모든 플랫폼에 있는 경우 Microsoft Windows, Linux 및 macOS에서 생성된 함수를 실행할 수 있습니다.

예제

예제 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          :

매개 변수

-file

래핑할 명령을 나타내는 JSON 파일입니다.

형식:String
Position:0
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

입력

None

출력

A Command object

참고

Import-CommandConfiguration 반환된 개체는 ToString 메서드를 통해 변환됩니다. 일반적으로 Export-CrescendoModule 사용하여 PowerShell .psm1 파일을 만들어야 합니다.