Call a specific version of PowerShell from C#

后端 未结 2 736
独厮守ぢ
独厮守ぢ 2021-01-27 15:03

I\'m trying to use the Get-VM Cmdlet called from C# on a Hyper-V host.

Obviously, the according PowerShell module Hyper-V has to be imported fi

2条回答
  •  醉话见心
    2021-01-27 15:14

    Have you looked at this yet?

    http://code.msdn.microsoft.com/windowsdesktop/Windows-PowerShell-30-SDK-9a34641d

    You might just need the new SDK to call Powershell 3 even if PSv3 is installed on your system already, but I'm usually just a straight Powershell guy.

提交回复
热议问题