我需要从我的程序运行 windows powershell 脚本。为此,我只需使用包含脚本主体本身的字符串 arg 启动 powershell 进程:
Process.Start("powershell.exe", "my script body..");
它有效。但我还需要将一些参数传递给脚本。它应该看起来像:
Process.Start("powershell.exe", "some args my script body..");
- 这是个问题。我知道这是可能的。我什至找到了description,但那里没有这样的例子。请帮忙