How to run a powershell script from a win form written in C#

前端 未结 2 1382
情话喂你
情话喂你 2021-01-15 18:03

first of all, I\'ve got a bit of development skills but it\'s been ages since i\'ve use them. Now i\'m trying to automate an install for a server application. So what i\'m t

2条回答
  •  不知归路
    2021-01-15 18:40

    I think you need to use "PowerShellInstance.Invoke();"

    Microsoft has a great tutorial here. https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/

提交回复
热议问题