# Best Web or Desktop GUI for Powershell

**URL:** https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086
**Category:** PowerShell Help
**Created:** [August 28, 2016, 9:56am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086 "2016-08-28T09:56:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 28, 2016, 9:56am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/1 "2016-08-28T09:56:33Z")

</div>

Hello all !!

I’ve been powershelling for about a year, learning by myself and i found powershell 100% useful.

I will appreciate any suggestion regarding to know which do you think is the best web language to learn, so i can create a front end´s GUI that communicates with Powershell.

For example, creating a full Admin Manager (GUI) that creates, deletes, add, remove groups, add permissions to folders, etc…

I know exists Sapien’s product, but is unreachable for me.

Thanks in advance !!!

---

<div class="post-metadata">

### Author: ![silent-steel](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@silent-steel](https://forums.powershell.org/u/silent-steel)
#### Post date: [August 28, 2016, 3:23pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/2 "2016-08-28T15:23:58Z")

</div>

Learn C#.

As PowerShell is .NET framework underneath, any .NET supported language will do.

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 28, 2016, 11:49pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/3 "2016-08-28T23:49:23Z")

</div>

Thanks Arie, can it be [vb.net](http://vb.net) too?

---

<div class="post-metadata">

### Author: ![dan-potter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dan-potter/32/138_2.png) [@dan-potter](https://forums.powershell.org/u/dan-potter)
#### Post date: [August 29, 2016, 6:56am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/4 "2016-08-29T06:56:18Z")

</div>

You can build GUIs in powershell without c# or vb.

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 29, 2016, 11:35am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/5 "2016-08-29T11:35:43Z")

</div>

> You can build GUIs in powershell without c# or vb.

I know Sapien´s tool. But i am looking a cheaper tool.

---

<div class="post-metadata">

### Author: ![dan-potter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dan-potter/32/138_2.png) [@dan-potter](https://forums.powershell.org/u/dan-potter)
#### Post date: [August 29, 2016, 11:42am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/6 "2016-08-29T11:42:55Z")

</div>

Notepad. The output from sapien is just powershell.

ex. you could write all this in notepad… I used to:D

```
function Call-blank_psf {

	[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
	
	[System.Windows.Forms.Application]::EnableVisualStyles()
	$form1 = New-Object 'System.Windows.Forms.Form'
	$button1 = New-Object 'System.Windows.Forms.Button'
	$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
	
	
	$form1_Load={
		
	}
	
	
	
	$Form_StateCorrection_Load=
	{
		#Correct the initial state of the form to prevent the .Net maximized form issue
		$form1.WindowState = $InitialFormWindowState
	}
	
	$Form_Cleanup_FormClosed=
	{
		
		try
		{
			$form1.remove_Load($form1_Load)
			$form1.remove_Load($Form_StateCorrection_Load)
			$form1.remove_FormClosed($Form_Cleanup_FormClosed)
		}
		catch [Exception]
		{ }
	}
	
	$form1.Controls.Add($button1)
	$form1.AutoScaleDimensions = '6, 13'
	$form1.AutoScaleMode = 'Font'
	$form1.ClientSize = '284, 262'
	$form1.Name = 'form1'
	$form1.Text = 'Form'
	$form1.add_Load($form1_Load)
	
	$button1.Location = '61, 73'
	$button1.Name = 'button1'
	$button1.Size = '75, 23'
	$button1.TabIndex = 0
	$button1.Text = 'button1'
	$button1.UseVisualStyleBackColor = $True
	$form1.ResumeLayout()
	

	$InitialFormWindowState = $form1.WindowState
	
	$form1.add_Load($Form_StateCorrection_Load)
	
	$form1.add_FormClosed($Form_Cleanup_FormClosed)
	
	return $form1.ShowDialog()

} 

Call-blank_psf | Out-Null
```

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 29, 2016, 2:29pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/7 "2016-08-29T14:29:29Z")

</div>

Looks nice !

The thing was that i was searching for a tool that can handle in graphic way the GUI. So i can grab and put the combobox, textbox, button, ex with the mouse anywhere. And then, double-clicking in the objets, i can program the logic of each event.

Like in VB.

---

<div class="post-metadata">

### Author: ![wilfredo-perez](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@wilfredo-perez](https://forums.powershell.org/u/wilfredo-perez)
#### Post date: [August 29, 2016, 3:00pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/8 "2016-08-29T15:00:29Z")

</div>

Try PowerShell Studio from Sapien

> **[PowerShell Studio | The Most Powerful PowerShell GUI Designer and Script...](https://www.sapien.com/software/powershell_studio)**
>
> The premier PowerShell integrated scripting and tool-making environment.

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 29, 2016, 3:05pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/9 "2016-08-29T15:05:27Z")

</div>

> Try PowerShell Studio from Sapien https://www.sapien.com/software/powershell\_studio

I´ve done it. But it´s too expensive to buy it for me.  
I am searching another tool, the best compatible tool for creating GUIs and then write the code in powershell.

---

<div class="post-metadata">

### Author: ![dan-potter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dan-potter/32/138_2.png) [@dan-potter](https://forums.powershell.org/u/dan-potter)
#### Post date: [August 29, 2016, 3:08pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/10 "2016-08-29T15:08:11Z")

</div>

I hear visual studio does it as well or it’s in progress. Personally if you’re looking for the best it’s Sapien(it’s built for powershell). Tons of other features people overlook such as exporting to exe, msi, source control, built in scripts for controls, remoting directly from the gui, etc. There is a free trial.

---

<div class="post-metadata">

### Author: ![84rusty](https://avatars.discourse-cdn.com/v4/letter/8/ac8455/32.png) [@84rusty](https://forums.powershell.org/u/84rusty)
#### Post date: [August 30, 2016, 3:46pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/11 "2016-08-30T15:46:00Z")

</div>

I’ve built GUI’s using Visual Studio 2015 (free community edition) and it’s worked great. Very easy and relatively intuitive.

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 30, 2016, 7:40pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/12 "2016-08-30T19:40:47Z")

</div>

> I've built GUI's using Visual Studio 2015 (free community edition) and it's worked great. Very easy and relatively intuitive.

Hi Rusty, Do you have a tutorial or something to start with?. I’ve seen that maybe, the best option is using something called hta.

---

<div class="post-metadata">

### Author: ![84rusty](https://avatars.discourse-cdn.com/v4/letter/8/ac8455/32.png) [@84rusty](https://forums.powershell.org/u/84rusty)
#### Post date: [August 30, 2016, 8:27pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/13 "2016-08-30T20:27:49Z")

</div>

Well I haven’t personally used HTA (HTML Application), so cannot guide you on that.

I have however, written a GUI front-end to a multithreaded powershell back-end, and use this for my IT Admin tasks at work.

Here’s a site that helped me early on,  
[https://foxdeploy.com/2015/04/10/part-i-creating-powershell-guis-in-minutes-using-visual-studio-a-new-hope/](https://foxdeploy.com/2015/04/10/part-i-creating-powershell-guis-in-minutes-using-visual-studio-a-new-hope/)

Let me know if you have any questions with anything.

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [August 30, 2016, 10:51pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/14 "2016-08-30T22:51:59Z")

</div>

> Here's a site that helped me early on,

Thanks, i will read on it.

So, the best option right now is Sapien´s…

---

<div class="post-metadata">

### Author: ![alex-innes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/alex-innes/32/129_2.png) [@alex-innes](https://forums.powershell.org/u/alex-innes)
#### Post date: [August 31, 2016, 2:04am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/15 "2016-08-31T02:04:22Z")

</div>

You can make GUIs in Visual Studios.

As mentioned above, FoxDeploy have a great series on how to do it. The Sapien tools make it easy-er.

> <https://gist.github.com/alexinnes/12c6dd0461399ac35fb29e36f00c98ab>

Here is my outline script - all you need to is create a WPF form in Visual Studios (which is free). Add name tags to your elements, copy and past the XAML in-between the @@ then run the script.

---

<div class="post-metadata">

### Author: ![dan-potter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dan-potter/32/138_2.png) [@dan-potter](https://forums.powershell.org/u/dan-potter)
#### Post date: [August 31, 2016, 7:49am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/16 "2016-08-31T07:49:55Z")

</div>

Beware, most of the code on that fox deploy site is wrong. Looks like you have to hand code all the events.

$WPFbutton.Add\_Click({$form.Close()}) is a no no!

---

<div class="post-metadata">

### Author: ![alex-innes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/alex-innes/32/129_2.png) [@alex-innes](https://forums.powershell.org/u/alex-innes)
#### Post date: [August 31, 2016, 8:45am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/17 "2016-08-31T08:45:13Z")

</div>

Excuse my ignorance, but why is $WPFbutton.Add\_Click({$form.Close()}) a no no?

---

<div class="post-metadata">

### Author: ![dan-potter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dan-potter/32/138_2.png) [@dan-potter](https://forums.powershell.org/u/dan-potter)
#### Post date: [August 31, 2016, 9:02am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/18 "2016-08-31T09:02:42Z")

</div>

First, we add all the events at form load; not after the button press.

Second, we use the buttons dialogresult property to close the form automatically.

---

<div class="post-metadata">

### Author: ![matt-mcnabb](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@matt-mcnabb](https://forums.powershell.org/u/matt-mcnabb)
#### Post date: [August 31, 2016, 11:35am UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/19 "2016-08-31T11:35:04Z")

</div>

here’s another interesting take on how to create GUIs with PowerShell

> **[PowerShell GUI with HTML - Part 1](https://tiberriver256.github.io/powershell/gui/html/PowerShell-HTML-GUI-Pt1/)**
>
> Part 1 of 3 in a blog series about building PowerShell GUIs using HTML and javascript.

Micah has essentially set up an all-PowerShell replacement for HTAs that builds an ad-hoc web server that serves up custom HTML pages which can then run PowerShell code. It’s an interesting idea in that most folks know or can easily learn some HTML to create simple forms.

---

<div class="post-metadata">

### Author: ![octavio-ricci](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@octavio-ricci](https://forums.powershell.org/u/octavio-ricci)
#### Post date: [September 1, 2016, 3:08pm UTC](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086/20 "2016-09-01T15:08:14Z")

</div>

Thanks all for your kindly help !!

I will investigate about creating the gui in [VB.net](http://VB.net) and export to the XAML…

[Next page](https://forums.powershell.org/t/best-web-or-desktop-gui-for-powershell/7086.md?page=2)
