powershell - "File not found" Can not use Invoke-SCScriptCommand with anything but cmd.exe + args -


i have made plugin microsoft system center virtual machine manager executes powershell script on host machine through powershell script called c# code of plugin. (shellception :p)

since allways got error decided test manually in scvmm right clicking on host , entering powershell.exe or powershellfor executable , export-v -name [name] -path [path] -force - copystate -wait. tells me there no such file. strangely works cmd(.exe) , echo test. shouldn't powershell installed on windows server 2012? also, if remotecontroll host, works fine in console. missing?

i figured out need provide full path when using powershell.exe executable. issue not hosts have system variable path includes path powershell.exe executable.

you can run powershell.exe providing full path: %windir%\system32\windowspowershell\v1.0\powershell.exe

or can run cmd.exe executable , run powershell.exe cmd:

executable: cmd.exe parameters: /c powershell.exe echo 1; return 0;


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -