创建PowerShell的一个GUI前端 [英] Create a GUI front end for Powershell
问题描述
什么是创建一个GUI前端PowerShell脚本包含多种功能的最好方式 - 在GUI即按钮将调用函数表示,同时喷出到底有些输出
What is the best way to create a GUI front-end for a Powershell Script containing multiple functions - i.e. buttons in the GUI which will call said functions and spew out some output in the end.
推荐答案
PowerShell的工作室从2012 Sapien的具有内置在GUI设计的,但它是相当昂贵的。
PowerShell Studio 2012 from Sapien has a built-in GUI designer, but it's fairly expensive.
另外还有 ShowUI模块在codePLEX,这是免费的,是朝鲜劳动党 - 这是部分的 PowerShellPack 。
There's also the ShowUI module on CodePlex, which is free, as is the WPK - which is part of the PowerShellPack.
所有这些工具都是伟大的,PowerShell是一个真棒的语言,但如果你真的需要为你的脚本的图形用户界面,你或许应该怀疑是否你实际上是写一个程序来代替。如果你实际上是写一个程序,使用诸如C#语言可能是一个更好的决定。
All of these tools are great, and PowerShell is an awesome language, but if you really need to have a graphical user interface for your script, you should perhaps question whether you're actually writing a program instead. If you're actually writing a program, using a language like C# may be a better decision.
如果你想与UI的脚本示例,您可以检查出<一href="http://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f">Convert-WindowsImage,这是我一年多前写的。这本来是更容易编写转换,WindowsImage作为一个C#程序,但我决定,这是更有趣的展示什么的PowerShell可以做的。
If you want an example of a script with a UI, you can check out Convert-WindowsImage, which I wrote a year or so ago. It would have been much easier to write Convert-WindowsImage as a C# program, but I decided that it was more interesting to showcase what PowerShell can do.
希望有所帮助。
这篇关于创建PowerShell的一个GUI前端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!