r/PowerShell • • Jun 29 '20

Free online WPF Designer for Powershell released! at poshgui.com

I've been working on this for so long, I can't believe I can finally post this :D

I just released a WPF Designer for Powershell at poshgui.com

It's free, so you can just head to the site and play around with it

It supports:

- Drag and drop designer

- Properties Panel

- Events

- DataContext Binding

- Out of the box theming

- XAML Panel with live reload

- Listview Templates and DataTemplates

and more

There is a long term roadmap available, what's coming are things like:

- Out of the box Multithreading using run spaces

- Windows 10 Toast Designer

- Project templates

- More themes

- Features allowing easy creation without knowing much of WPF

It's an Alpha version, I'm sure it still has some bugs which will be fixed when I'm notified about them

I want to thank everybody in this community for your support as you are the reason this project exists :)

4 Years ago I released an ugly, crappy web app as a side project, not expecting anyone to use it

It was support from this subreddit that led to a complete rewrite of the app, with more than 23 000 people using it

The most requested feature was to add WPF support.

I'm very happy to tell, that after 1,5 year of hard work, I can finally tell you it's here :)

and it has much more power and functionality than the WinForms one :)

221 Upvotes

59 comments sorted by

8

u/BlackV Jun 29 '20

Was it not already free? It's been there for a few years now right?

19

u/nepronen Jun 29 '20

It was always free, but It only had WinForms support for the last 4 years

Today I released a second designer on the site, allowing you to create WPF forms

You can create much more advanced and prettier UI's with it

I specified it's free in the title, as it could be the first question for some people not familiar with the site

0

u/BlackV Jun 29 '20

Ya I just saw it

10

u/BlackV Jun 29 '20

Oh wpf is new

Nice

3

u/da_chicken Jun 29 '20

I have strong opinions about GUIs for Powershell commands and scripts, but I know a lot of people really enjoy creating them. This site has always been a fantastic resource, and you should be very proud of this work! Well done and thank you for you contributions!

5

u/nepronen Jun 29 '20

Thank you for the kind words

I understand some people are not advising using GUI's and I totally get it :)

Speaking to motivations of people creating GUI's I can see these two as the biggest ones:

- Sharing scripts with colleagues that don't know Powershell so they can use them

- Apparently providing a user interface that automates something can impress colleagues/bosses

I once received a really cool message with a donation, saying that providing automation scripts with nice UI's for colleagues in helpdesk led to being noticed more in the eyes of a manager and ultimately helped a person to get a promotion :)

3

u/da_chicken Jun 29 '20

I do like a GUI as a learning resource. I do understand why people GUIs, I just find that the primary utility of Powershell is automation and modular functions, and GUIs kind of work against that goal in a general sense because they need user interaction every execution. I just don't find that useful for the way that I use Powershell in my work. But, my workflow is not everyone's workflow, and my religious choices about the way Powershell coding should be done aren't going to be shared by everyone. Even if I never use it, I think PoshGUI is a valuable and important resource for the community. It's not a tool I will use, but I know it's a well-made tool that helps a lot of people!

1

u/nascentt Jun 29 '20

My reasoning is. As long as the gui and functionality is separate it's ok.

I make scripts and modules etc. Then make guis in separate ps1s/functions that call those scripts and module's functions.

No actual code in the guis, and anyone that wants to ignore the guis doesnt need to use them.

2

u/nepronen Jun 29 '20

Yeah, mixing logic and gui is a big issue in the PowerShell guis I saw

In current WinForms designer, people sometimes write code in the event handler directly, I couldn't change that because it would break some people scripts

In WPF I'll try to do a better job to force the users a bit to have more structured scripts

1

u/da_chicken Jun 29 '20

That's definitely the way to do it.

I'd just rather do the GUI in a C# application that calls System.Management.Automation to call the commands. IMX if I need a GUI, it's because the people using the application don't understand scripting and can't be trusted to specify the parameters themselves. In that case, I don't want to give end users a script file at all because that'll just confuse them. I want to give them a signed executable. And PS2EXE feels like even worse of a hack.

Of course, I haven't needed to do any of this for about 5 or more years....

1

u/m698322h Jun 30 '20

GUI-less scripts are great but can be a burden too. We have made a huge PS application for use with Helpdesk tasks and Server/Infrastructure. All of our in-house modules are GUI-less then we have a PS wrapper that stands between the modules and GUI code. We are actually starting to change our internal application to WPF in hopes to simplify some things.

Kudos for creating the WPF designer, this will be of great help to those who do not want to bloat their system with Visual Studio just to create forms.

2

u/nepronen Jun 30 '20

I have just added the fix for the issue causing "Unauthorized" to appear despite being successfully logged in

If anyone had this issue, please test if it works ok now, you'll have to log out and log in again

2

u/memphisraynz Jun 29 '20

Can't wait to try it out.

I logged in and tried creating both a public and private, but it sits at creating.

3

u/nepronen Jun 29 '20

Ok so there's some issue here as it should take more than a second

Can I ask what browser are you using and what kind of account you have? Meaning whether you used some email or google/fb authentication?

3

u/memphisraynz Jun 29 '20

Thanks, I m using Chrome on Windows 10. I logged in with a Goolge authed sign in.

2

u/nepronen Jun 29 '20

Same set up I use

Can you clear your cache and try again?

I think it's an authorization issue, I'll look into it

1

u/memphisraynz Jun 29 '20

So I tried Google auth at work, same thing. I signed out and signed in with a username and pass. This time I was able to create a WPF app. Thanks for your help.

1

u/nepronen Jun 30 '20

I've applied a fix for the initial issue, if you could test it in spare time that would be awesome

You'll have to log out and log in for it to take effect

1

u/memphisraynz Jun 30 '20

After logging out and then back in with Google Auth I am still getting the same issue where it just sits at saying creating after trying to create a new project.

1

u/nepronen Jun 30 '20

But the text field for the name doesn't change to red with error text "Unathorized"?

If not, it seems like a different issue than other users had, I'll keep looking

1

u/memphisraynz Jun 30 '20

After trying to create a new project it just stays on the same screen saying creating. Nothing changes. No errors.

No rush on my behalf, I cna log in with a username and password.

1

u/nascentt Jun 29 '20

try an incognito window

6

u/[deleted] Jun 29 '20

Wow nice, have to give a try soon, thank you

6

u/0x3e4 Jun 29 '20

big up for this mate.. i really like the work and effort you did here.
already know your site for a longer time but hadn't time yet to play with it more.. ill deffo do it one day cuz i have coded myself a lil "mgmt tool" for our it department which is also built on a presentation framework and i know how annoying this stuff is haha.

1

u/PSP_Joker Jun 29 '20

When I try to access the WPF Designer I get hit with a login page. Is this intended?

9

u/nepronen Jun 29 '20

If you are not logged in then yes

The reason for that is I had multiple people asking me if I can bring back their work, which they did while not logged in

I couldn't

So now you have to be logged in to work, as a safety feature, autosave is also enabled by default, as people sometimes refreshed the website without saving and lost their work

This will be implemented in WinForms also, In the next release

5

u/ianitic Jun 29 '20

Just as a heads up, their may be infosec issues at certain companies regarding that. Assuming you’re okay with this being used in a commercial capacity?

3

u/nepronen Jun 29 '20

Well I didn't think it through then

I'm fine with commercial use, I got some questions about that, so I've added a usage policy to the docs

Could you tell me a little bit about the infosec issues?

Because there are a lot of companies using poshgui right now, and they have accounts

I don't imagine any company would actually want to use it without an account, as it's easy to lose your work

So is this something about not seeing the tool before you create an account?

Or is it more about not creating an account at all, as you're putting company data to some web apps server?

1

u/PSP_Joker Jun 29 '20

For us it has the issue of potential company data on a webserver. We are not allowed by data protection law. :(

9

u/nepronen Jun 29 '20

Well you can then just design the layout and add the logic/company data on your local computer

I'll think about adding using your local storage in your browser so you don't have to log in to use it and save it in your browser in the future releases

3

u/ianitic Jun 29 '20

This would be my primary concern as well and that is honestly what I’ve done in the past just in case.

I do know companies sometimes have weird seemingly arbitrary infosec policies. For instance, did you know any and all use of php is banned at Amazon?

Also, do you support poshgui all by yourself? If so thats quite impressive! Keep up the good work!

3

u/nepronen Jun 29 '20

I did not know about the php in amazon, interesting.

I am supporting PoshGui by myself, I recently had some help from a contributor who helped me set up multithreading which will come out in the next release, and I've previously hired a freelancer to help me secure the server as I knew nothing about it

I'm curious if you think that designing the site in a way that'll allow people to bypass these infosec rules is the right course of action

I assume they are there for a reason. Companies also use a lot of different software so is it really hard to add another one just by asking infosec people?

I don't do anything with the data, you can easily delete accounts and everything related to them. So maybe some documentation from my side would be enough to convince infosec that you can just use it?

I know the fact that poshgui is not a company, just a guy with a web app can be problematic with that :P

1

u/ianitic Jun 29 '20

I would definitely prefer an override to requiring an account though I’m not sure what that would look like. While I’m no longer at Amazon, I do know former coworkers that use poshgui occasionally.

From the infosec policies I remember, they’re super particular on specific open source licensing, and storage of information. I know a common infosec violation was using smartsheet for instance. Infosec is also not a homogenous group and selectively enforce rules by location/org. I remember that the process to get an exception was pretty painful though.

It’s really cool how well this web app is though btw! I hope it’s not too expensive to host? I imagine you have a decent number of users.

2

u/nepronen Jun 29 '20

Yesterday it was 23K registered users with 6-8K monthly active users, but I imagine it will be a bit higher after today as I can see new accounts being added as we speak

I didn't know how much people are using the tool while not logged in, I'll check that

The cost is not that high but I wouldn't mind it being lower :) All costs are about 500$ per year, but I do have a test server and weekly backups of the whole production server

also, the donations cover about 20% of that cost

I just hope that small server will handle the auto save feature :D if not I'll probably upgrade it

I'm also thinking about buying a plan from email provider, as currently, I'm using a free plan from Mailgun. They use shared ips for a free plan and that causes some problems, people not getting verification email etc.

also I just figured if accounts will keep adding at this rate till tomorrow, I might run out of the mail limit :P didn't think that one through

Poshgui doesn't use PHP or any tool like smartsheets at all, it's a pretty standard web stack, Linux, nodejs, MongoDB, react and wasm in the latest release

I can just disable the requirement to log in to use the tool with a warning about it not being saved

I actually though requiring the Login was a good feature for people that forget to do that :D

2

u/PSP_Joker Jun 29 '20

Thank you! Yes, I only use it to design the frontend, the logic I use behind it is brought in with VS Code. The problem is that even the mailadress is in theory company data which means we would have to go through the Infosec department to be allowed to create an account.

I know this very strict, but sadly applies to most public authorities here...

2

u/ianitic Jun 29 '20

Yup, this was exactly my thinking!

0

u/[deleted] Jun 29 '20

[deleted]

1

u/2dubs Jun 29 '20

This. Don't sweat fixing what isn't broken. Worst case, some of the bigger companies might start blocking access to the site from inside the organization. It's just a part of InfoSec. Stupid people will always find new ways to do stupid things.

2

u/nascentt Jun 29 '20 edited Jun 29 '20

I miss being able to design guis without logging in. Perhaps a prompt that requires the user to confirm that by not logging in their work is not saved?

2

u/nepronen Jun 29 '20

Can be done :)

I actually though requiring to log in will be a nice feature :P

But you'll need to wait a bit, probably at least till the weekend

1

u/paully104 Jun 29 '20

Awesome, good work! Playing around with it now is there a easy way to rename a button's text? It would be awesome if I could double click it and edit it like a text field if that is possible.

1

u/nepronen Jun 29 '20

Currently the easiest, if you don't want to use properties panel is to change it in XAML panel

I'm thinking to expand the context menu that appears when you right click a control, to contain common properties.

So you would right click a button, you could change the content string, Alignments, Text Styling and When you would click a stack panel, you would see properties like Orientation

1

u/paully104 Jun 29 '20

I think that is a great idea.

1

u/nascentt Jun 30 '20

Slightly off topic but keep meaning to ask.

Is there a way to import poshgui code to edit a GUI previously made on the site?

The GUI section is read only (I understand why).

But it's be nice for a way to 'import' via copy paste a GUI make in the past by the site.

1

u/nepronen Jun 30 '20

It's not possible with WinForms, but with WPF you could easily do that as you can copy and paste the XAML from the output

1

u/nascentt Jun 30 '20

Hmm i tried but the GUI section was read only on poshgui. Maybe I didn't look properly

1

u/nepronen Jun 30 '20

Yo need to paste the xaml on the page where the designer is

2

u/BocciaChoc Jun 29 '20

I just wanted to say that this tool has made my life much much easier for a number of my projects - Thank you for this wonderful tool :)

1

u/nascentt Jun 29 '20

Bravo. Thank you for this from the bottom of my heart.

1

u/Sekers Jun 29 '20

Awesome. Can't wait to have the time to look at this.

1

u/dragonfleas Jun 29 '20

YESSSSSSSS FINALLY!

1

u/dragonfleas Jun 29 '20

p.s. I LOVE YOU FOR THIS

1

u/DonCheese02 Jun 29 '20

Awesome feature. Thank you for all your hard work ! ! !

1

u/Net-Packet Jun 29 '20

You are a fantastic human being.

1

u/rva_musashi Jul 06 '20

Wow this is amazing and after I spent learning WPF last week. You work is greatly appreciated.

1

u/ziro12345 Jan 29 '25

For new readers, PoshGUI has become rapid popular in recent years, and has now become a paid product, it is only free for the first 7 days.

0

u/[deleted] Jun 29 '20

[deleted]

1

u/nepronen Jun 29 '20

No, it means there is an issue with authorization, the backend thinks you are not logged in.

I will investigate this as already a couple of people mentioned this problem. Are you using Google auth?

1

u/KingOfTheBigSigh Jun 30 '20

I also had this issue when I was looking at it yesterday. I was able to get in after re-logging in... I also had several tabs open simultaneously.

0

u/[deleted] Jun 29 '20

[deleted]

1

u/nepronen Jun 30 '20

I've applied a fix if you could check if it works, and give me feedback that would be great

You'll have to log out and log in again for it to take effect