Connect-VIServer 등의 PowerCLI 명령을 사용하는 powershell 스크립트 파일이 있습니다. PowerVI에 라이브러리 참조를 추가 한 후 PowerGUI에서 스크립트 파일을 실행할 수 있지만 어떻게 작동하는지 모릅니다 SoapUI를 통해 실행합니다. 나는 그것도 일반 Powershell CLI와 함께 작동하지 않을 것 같아요. 이 일을 할 수있는 방법이 있습니까? 여기에 도움이된다면 오류는 다음과 같습니다SoapUI를 사용하여 VMWare powerCLI 명령 실행
The term 'Connect-VIServer' is not recognized as the name of a cmdlet, function
, script file, or operable program. Check the spelling of the name, or if a pat
h was included, verify that the path is correct and try again.
At Test.ps1:10 char:23
+ $vm = Connect-VIServer <<<< -Server $vcenterIP -User $vcenterUser -Password
$vcenterPW
+ CategoryInfo : ObjectNotFound: (Connect-VIServer:String) [], Co
mmandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
나는 정상적인 윈도우 명령 프롬프트에서 내가 스크립트를 실행할 수 있는지 나는이 작업을 수행 할 수 있습니다 실현 :
는 토마스가 언급 한 명령을 사용 파워 쉘 호스트에 스냅인을 추가합니다. SoapUI의 Groovy 스크립트에서 "powershell Test.ps1"명령을 실행합니다. "powercli Test.ps1"과 같은 것을 사용하면 저에게 도움이 될 수 있습니다. 불행히도 그것은 작동하지 않습니다. 그런 마법 명령이 있습니까? – dhishkaow