如何在VB.Net中运行Powershell脚本 [英] How to run Powershell scripts in VB.Net

查看:324
本文介绍了如何在VB.Net中运行Powershell脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在VB.Net中运行Exchange 2007 powershell脚本,但是我似乎找不到能够显示如何在加载模块时执行此操作的方法.

执行此操作的最佳方法是什么?

解决方案

您可以在VB中运行Powershell脚本,请查看以下链接

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

上面发布的链接将带您逐步了解如何完成此操作.

查看与您的问题相关的问题: 在.NET Windows应用程序内运行powershell脚本

以下这篇文章是用C#语言编写的,但应该可以帮助您更好地理解该概念:

http://www.codeproject .com/Articles/18229/如何从C运行PowerShell-scripts

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?

解决方案

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

这篇关于如何在VB.Net中运行Powershell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆