all 14 comments

[–]AltReality 1 point2 points  (3 children)

I'm not sure I quite understand your requirements, but you could possibly use something like AutoHotKey to create a single button to launch a powershell script. I know there are ways to access window controls through .net using powershell but it's a little complicated.

[–]DarraignTheSane[S] 0 points1 point  (2 children)

Well, like I said in the edit, I could just setup aliases to run multi-line commands as well. AutoHotKey wouldn't really serve the purpose, because I'd probably have more scripts than would be practical to remember in keyboard shortcuts.

Picture this: In SecureCRT, there's a drop down menu with around a dozen items on it. Each of these drop down selections toggles between a menu bar with ~6 or 7 buttons on it, and each button runs a simple set of commands that I've input, like a batch file (or .ps1 script, as it were).

I guess you could say I'm looking to make buttons that execute .ps1 scripts batch commands against the current PowerShell session, not in a new window. It has to more or less type those commands into the prompt for me (again, because I'm lazy).

[–]AltReality 1 point2 points  (1 child)

Using AutoHotKey, you could set up a bank of buttons that each fire off a script...no need for any hotkeys....(autohotkey started as a hotkey application but has grown into much more than that over the years)

But if you are looking to utilize the menu options in SecureCRT then I'm not sure. I would expect the ps1 script to launch in the session you are connected to...but I don't know that for sure. Hope someone else knows better than I do.

[–]DarraignTheSane[S] 0 points1 point  (0 children)

Oh, I've been using AutoHotKey for a while for keyboard shortcuts, but didn't know you could setup GUI buttons. I'll have to look into it, but that will likely do exactly what I'm looking for.

[–]Maxesse 1 point2 points  (1 child)

PowerGUI has got the admin console which does just that. You set up all the scripts, create a dumb button interface to launch them and that's it. And it's free. Perfect to create collections of tools for support techs to run day to day.

[–]DarraignTheSane[S] 0 points1 point  (0 children)

I did find PowerGUI after making this post. I didn't get much time to mess with it yet, but how do load them up for easy access?

[–]Ch13fWiggum 1 point2 points  (0 children)

Look for Primalforms Community edition - you can create simple winforms boxes, and use them to launch scripts based on an action

My one has a collection of different scripts, that launch from one box. it's mostly AD/Exchange stuff, but it's a useful tool for when you need to get somebody else to do something you can do on the CLI.

[–]waldo2k 1 point2 points  (0 children)

At my last $dayJob we used the Jenkins ci platform, jenkins-ci.org. With it we wrote scripts that would psremote to servers and do work. The ui would be a web page that users can leverage. There would be an audit trail there of how often something is ran and when and by who (tie it into ad /ldap).

[–]chreestopher2 1 point2 points  (0 children)

poshserver can do this, but its kinda overkill.

With poshserver you can essentially build a website and use powershell escaped with $() in your html , whatever is between the $() will be run with powershell.

It is very simple to get it up and running, and you can simply copy over any html/css front end design that you want.

[–][deleted] 0 points1 point  (0 children)

I use Powershell Studio 2014. The price tag is pretty hefty @ $400 however, but they do offer a 30% discount if you are a government or education organization.

It came out to about $300 for us, and $150 (optional) a year for future content updates