Avatar of IT_Support Private
IT_Support Private

asked on 

Basic Windows GUI for running from a list of Powershell scripts

Hi All,

I am trying to put together a little GUI to be used by my team so that we can run a selection of PS scripts at the click of a few buttons.

The idea i have seen in an old job several years back was something sort of like this,

Basically a page with Buttons and text box descriptions,

then a text file or even integrated for a task list that I can edit the Function and Description of the buttons.

Has anyone seen anything like this, i am new to programming and cant afford to spend several hundred for PowerStudio i was hoping to find a easier way that I can edit someone elses work?

thanks
User generated image
PowershellProgrammingWindows OS

Avatar of undefined
Last Comment
IT_Support Private
Avatar of Bill Prew
Bill Prew

Are you looking for some sample Powershell code of the front end UI app, or a freeware third party solution that provides this sort of menu capability?


»bp
Avatar of IT_Support Private

ASKER

Happy to explore either/any possibiliies that would achieve the ability to run a selection of scripts stored in a certain subfolder.
Avatar of Bill Prew
Bill Prew

To give you an idea of what's possible in Powershell, take a look at my accepted solution to this earlier question.  The UI content is different of course, but it might give you an idea of what is possible in PS, and what the code looks like.  Maybe help give you and idea if you want to bite that off.


I'll follow up with a couple of other non PS options in a minute.


»bp
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of IT_Support Private

ASKER

Thanks
Avatar of Bill Prew
Bill Prew

And if you ever do see a need for a Powershell UI, take a look at this site, it's a pretty cool way to graphically lay out a UI and it generates PS code to produce it.  Kinda cool...



»bp
Avatar of IT_Support Private

ASKER

Thanks, Ye i did check out that site though as im not that familiar with powershell yet I think Qsel will be perfect for now and I will engage back on EE for a more customised solution once i get my act together.
Avatar of Bill Prew
Bill Prew

Great, good luck.


»bp
Avatar of IT_Support Private

ASKER

Hi Bill,
I was just playing around with the qsel again, and wondering, (and understand its not your creation though was wondering i you may happen to know the format/use for it)
Regarding the Paramater and Directory field , I am trying to run some scripts that i suspect may require admin powersehll session to run,
So, is there a certain format i can put in the paramater box such as "Run/As..." to make it use an admin powershell Session, or is it for something else.
I assume it is probably better to incorporate the get-credentials into the initial script?

Also, the Starting Directory, what would be the purpose of that,
Eg, i have a script to get HotFix ID;s that I'm trying to make output to a temp text file, is there a purpose of using the Starting Directory as the "Temp" folder or what would be the purpose of Starting Directory if I am already specifying where the script is stored.
get-wmiobject Win32_QuickFixEngineering | sort -property HotFixID | select -property HotFixID, Description | out-file C:\Scripts\output.txt

Open in new window


In the meantime, ill see what i can find out on the Qsel website for further details. Thanks
Avatar of Bill Prew
Bill Prew

Offline for a week, will check back.
Avatar of Bill Prew
Bill Prew

I don't think QSEL has any way to elevate privs in it before launching a program.  I suspect you could build a front end Posh script that did that though, and then executed a script passed to it as a parm perhaps.

As far as the other fields, take a look at the CHM file that comes with QSEL, it has decent Help info on the app.  An excerpt from it:

  • Parameters (optional): Some programs may accept switches, file names etc.. Enclose file names in quote marks if necessary!
  • Directory (optional): By default the directory of the launched program is assumed.

The first is just a place where you can specify any command line parms or switches to pass to the Program that you are launching.

The second is the directory that will be set as the current directory when the Program is launched.  Some applications expect a certain folder to be the current folder when they launch, for accessing files, etc.


»bp
Avatar of IT_Support Private

ASKER

THANks. Much appreciated.
Until i get more familiar with ps i have simply incorporated the get-credentials into the individual scripts where required.
Windows OS
Windows OS

This topic area includes legacy versions of Windows prior to Windows 2000: Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions including Windows Mobile.

129K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo