How to run Powershell scripts in VB.Net

烈酒焚心 提交于 2019-12-12 12:54:14

问题


I need to run an Exchange 2007 powershell script in VB.Net, but I can't seem to find a method that shows how to do it with the module loaded.

What is the best method to do this?


回答1:


You can run powershell scripts in VB, take a look at the following link

http://blogs.msdn.com/b/zainnab/archive/2008/07/26/calling-a-powershell-script-from-your-net-code.aspx

The link posted above takes you step by step on how to accomplish this.

Check out this question that relates to yours: Running powershell scripts from within a .NET windows app

This following article is in C# but should help you understand the concept a bit better:

http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C



来源:https://stackoverflow.com/questions/11782121/how-to-run-powershell-scripts-in-vb-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!