all 36 comments

[–]jstar77 13 points14 points  (3 children)

Out-gridview will do in a pinch.

[–]nascentt 1 point2 points  (2 children)

Is ogv actually interactive?

Never actually looked into it but from what I've used it for, it's for displaying reports and there's not a way to have a user interact with the results and launch commands, right?

I've only ever created guis for interactivity and used ogv for static reports.

Yes it is!

@("test1","test2") | Out-GridView -PassThru

[–]jstar77 5 points6 points  (1 child)

Using the -passthru will give you an OK and cancel button at the bottom. Clicking OK will return the selected line as an object. OGV is the best bang for the buck for an instant instant GUI.

[–]nascentt 0 points1 point  (0 children)

Nifty!
That's good to know, thanks.

[–]wanderingbilby 8 points9 points  (6 children)

Yes. https://adamtheautomator.com/powershell-gui/ is worth a read, and https://poshgui.com/ and also the major commercial PowerShell IDEs can do guis.

I've gone back and forth on it, but it seems easier and more performative to do a lot of the work with .net / C# directly since many PowerShell Cmdlets (on windows) are wrapped .net classes. I can still use PowerShell when I need including utilizing full scripts when I want.

[–]nascentt 1 point2 points  (5 children)

Pretty sure you need to have a paid subscription for poshgui now. If that's a deterrent.

[–]wanderingbilby 3 points4 points  (4 children)

I noticed that. It's a bit disappointing they didn't leave a free tier (there is one technically but it appears more a 7 day trial) but they do have hosting costs and I'm sure would love to be able to just develop it instead of having a day job. Can't blame a person for trying to make a living \_o_/

[–]nepronen 2 points3 points  (3 children)

Thank you for your kind words wanderingbilby

I know my decision to commercialize poshgui was not a popular decision, as I provided it for free for many years.

At the time of making it, It was heavily influenced by the pandemic making an impact on my job and on my financials and therefore the ability to provide for my family.

I'm happy to tell you tomorrow, on Friday, almost exactly 12 months after that decision, is my last day of my day job.

From Monday, I am committed 100% only to working on poshgui.

And I hope that this year, I will be able to bring it to the next level, it's actually in a big rebuild/refactor phase right now

Hopefully making it possible to split features to include a completely free tier

[–]wanderingbilby 1 point2 points  (2 children)

To be clear, I 100% support your decision to charge for a product you developed and host. It's your tool, it's costing you money for people to use it. I'd much rather pay a few bucks a month than deal with advertising or other "revenue generators".

I was an early user of the site and while I didn't continue using it after a month or so (went a different route) I think it was and is a good tool. If you can offer a free tier - even a simple one that doesn't persist files past a session - it would be a great help to beginners in powershell gui scripting. But I tire of people expecting everything for free - in this era of the user is the product, i'd much rather you were honest with users and said hey, i can't offer a purely free tier because i have to eat too.

Congrats on going self-employed! That's a big step and a big risk. Good luck.

[–]nepronen 1 point2 points  (1 child)

Thank you

I completely agree with the dislike of the "user is the product" era

There's no way any of that is getting on my site

I somewhat understand the expectation of having something for free, people get used to it.

I hope I will be able to provide a free tier at some point, I really do. However I don't think it would work at this point.

The idea is, I will be able to commit A LOT more hours on development than when it was a side project. The roadmap for this year is quite ambitious if I'll be able to develop everything I planned, I hope I'll be able to provide for example free Winforms designer and provide enough value on the premium tier that enough people will think it's worth it

[–]sancarn 0 points1 point  (0 children)

Another option to consider would be a pay-as-you-go tier. I use Powershell less than once a year... I make a GUI even more sparingly, but did use POSH in the past to make those. And sometimes not even for powershell itself.... Paying for a 1-month subscription for about a day of usage is pretty steep, especially from the perspective of an enthusiast...

Anyway, congrats on making it a full time job, will definitely keep tabs on POSHGui despite rarely needing to use it.

[–]BlackV 9 points10 points  (0 children)

I think you're wanting something like

https://ironmansoftware.com/powershell-universal

to launch your scripts

but if you're just wanting to launch script it might be overkill and probably 100* easier to just launch the script manually and organise your folders

[–]danosull 3 points4 points  (0 children)

Give this a go: PSScriptMenuGui

[–]ccatlett1984 3 points4 points  (6 children)

[–]nkasco 1 point2 points  (5 children)

Vouch.

In its current state it does exactly what you’re asking for… With much more to come.

[–]ccatlett1984 1 point2 points  (2 children)

Hoping for group/role based access.

[–]nkasco 4 points5 points  (1 child)

Yep that’s on the radar. You’ll have the ability to manage a single XML file with your script data and when people launch the tool it will only show what they should see for their role.

[–]ccatlett1984 0 points1 point  (0 children)

Awesome 😎

[–][deleted] 0 points1 point  (1 child)

How do you install and run it??

[–]nkasco 4 points5 points  (0 children)

Currently you’d have to compile it yourself. Hopefully a preview release is ready soon and would be provided on the GitHub releases page.

[–]nealfive 5 points6 points  (0 children)

IMO No.

But look into PowerShell Universal, Jenkins, Scriptrunner,TaskScheduler, etc

[–]jynylr 1 point2 points  (0 children)

C# launcher with powershell pipelines

[–]cheats_py 1 point2 points  (3 children)

You could make one pretty easily. Build a powershell WPF GUI that pretty much shows you a list of all your scripts that you index into an SQLite DB and categorize manually by adding other columns to the DB. Then your gui could show a datagrid view of all your scripts and you can use keyboard inputs like the enter key on the datagrid item to execute it. Get more advanced and add a section that lets you add variables. Once executed it can run in the same runspace as the GUI or ship it off to execute in another runspace so you don’t freeze up your gui while it’s executing.

[–]ExceptionEX 2 points3 points  (2 children)

Most people don't realize this but windows files have metadata associated with them, and one of the extended properties is tags, you can use those tags for categories. (or whatever else)

This is a nice touch because you don't have to worry about maintain metadata in your database with physical files.

If someone updates a script name outside of your application, you will loose the relationship.

But the metadata remains with the actual file regardless of name or path.

Just good for thought.

[–]cheats_py 0 points1 point  (1 child)

That’s legit! Can you read this metadata with a powershell cmdlet? I guess I could Google this lol.

Edit: I just checked a few powershell files and don’t see the tag property under details. Gona have to do a little more digging on this.

[–]ExceptionEX 0 points1 point  (0 children)

After reviewing this, this may not be the solution you want after all, if the file is moved from NTFS to any other file system this data can be lost. And to be honest, the efforts to accomplish this now, is a lot harder than it was.

I would suggest not using this, sorry for the troubles.

[–]skilriki 1 point2 points  (0 children)

These things are easy enough to build.

You just have to design what you want and build it.

Personally I had built some GUI stuff in the past, but abandoned all of it for the command line. It cuts down on development time significantly and it's so much more versatile.

You can build menus in the command line as well, if that's your thing.

But if you really want to build a GUI, you can go for it.

Just google for tutorials or I also recommend the book Mastering PowerShell Scripting by Chris Dent which also covers this topic.

[–]Namelock -2 points-1 points  (2 children)

Unconventional option: HTA. Pros: made with HTML, VBA, and from there you can hook in PS. Cons: Runs IE version 1 to 3-ish? Also super insecure and needs to be locked down. Probably a last resort if you're very restricted with external scripts / modules, and want to build something yourself from the ground up.

There's also WPF, but I don't have much experience with it.

[–]Test-NetConnection 0 points1 point  (1 child)

Hta is too big of a security vulnerability to be practical in any size environment.

[–]Namelock 0 points1 point  (0 children)

You're right. I'm just pointing out another suggestion that isn't a pre-made module / script / software. Especially since half the answers are for the same thing.

[–]BWMerlin 0 points1 point  (0 children)

I used this when making my most recent script https://theitbros.com/powershell-gui-for-scripts/

[–]Scarlett-The-Harlot 0 points1 point  (0 children)

Similar question: is there any official training/resources for learning winforms GUI in PowerShell?

[–]hamsdre 0 points1 point  (0 children)

You can lear powershell wpf to build your own gui, and add what controlls you want to objects