Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Wrapping PowerShell Scripts In A GUI Interface

Reply
 
Old 09-20-2007   #1 (permalink)
GregHMI


 
 

Wrapping PowerShell Scripts In A GUI Interface

I am fairly new to PowerShell and was looking for a way to take the scripts I
have created in PowerShell and provide a nice GUI interface for our end
users. For example, a screen which would perhaps have a nice GUI that would
ask for an end users response, or a button that would launch a PowerShell
script to find all of the disabled users in AD. In our company, we have some
power users who don't mind seeing command line responses, but there is also a
great number who have come to expect a nice crisp screen, with focussed menu
viewing areas to respond to, or to find valuable data. One of the answers I
found when working with VB scripting was using the HTML Application, where
you can create a nice GUI for user commands, or responses, (see the article
in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up in a GUI
interface",
http://www.microsoft.com/technet/scr...tutorial1.mspx

It would be nice to see this same type of approach with PowerShell. Any
ideas if this can be done with PowerShell?

Anybody's help would be much appreciated.

Thanks -

My System SpecsSystem Spec
Old 09-20-2007   #2 (permalink)
Karl Mitschke


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

Hello GregHMI,
Quote:

> I am fairly new to PowerShell and was looking for a way to take the
> scripts I have created in PowerShell and provide a nice GUI interface
> for our end users. For example, a screen which would perhaps have a
> nice GUI that would ask for an end users response, or a button that
> would launch a PowerShell script to find all of the disabled users in
> AD. In our company, we have some power users who don't mind seeing
> command line responses, but there is also a great number who have come
> to expect a nice crisp screen, with focussed menu viewing areas to
> respond to, or to find valuable data. One of the answers I found when
> working with VB scripting was using the HTML Application, where you
> can create a nice GUI for user commands, or responses, (see the
> article in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up
> in a GUI interface",
> http://www.microsoft.com/technet/scr...s/tutorial1.ms
> px
>
> It would be nice to see this same type of approach with PowerShell.
> Any ideas if this can be done with PowerShell?
>
> Anybody's help would be much appreciated.
>
> Thanks -
>
Take a look at this:

http://www.codeproject.com/useritems...PowerShell.asp

Karl


My System SpecsSystem Spec
Old 09-21-2007   #3 (permalink)
RichS


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

have a look at PowerGUI

www.powergui.org
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Karl Mitschke" wrote:
Quote:

> Hello GregHMI,
>
Quote:

> > I am fairly new to PowerShell and was looking for a way to take the
> > scripts I have created in PowerShell and provide a nice GUI interface
> > for our end users. For example, a screen which would perhaps have a
> > nice GUI that would ask for an end users response, or a button that
> > would launch a PowerShell script to find all of the disabled users in
> > AD. In our company, we have some power users who don't mind seeing
> > command line responses, but there is also a great number who have come
> > to expect a nice crisp screen, with focussed menu viewing areas to
> > respond to, or to find valuable data. One of the answers I found when
> > working with VB scripting was using the HTML Application, where you
> > can create a nice GUI for user commands, or responses, (see the
> > article in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up
> > in a GUI interface",
> > http://www.microsoft.com/technet/scr...s/tutorial1.ms
> > px
> >
> > It would be nice to see this same type of approach with PowerShell.
> > Any ideas if this can be done with PowerShell?
> >
> > Anybody's help would be much appreciated.
> >
> > Thanks -
> >
>
> Take a look at this:
>
> http://www.codeproject.com/useritems...PowerShell.asp
>
> Karl
>
>
>
My System SpecsSystem Spec
Old 09-21-2007   #4 (permalink)
GregHMI


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

Karl,

Thanks for the information. I am not as familar with C# programming, but
that is very close to what I was looking for. Perhaps I won't be able to
find something like I mentioned in the Technet article:
http://www.microsoft.com/technet/scr...tutorial1.mspx

I may need to get more creative and try working with the information you
gave me.

Thanks -

Greg


"Karl Mitschke" wrote:
Quote:

> Hello GregHMI,
>
Quote:

> > I am fairly new to PowerShell and was looking for a way to take the
> > scripts I have created in PowerShell and provide a nice GUI interface
> > for our end users. For example, a screen which would perhaps have a
> > nice GUI that would ask for an end users response, or a button that
> > would launch a PowerShell script to find all of the disabled users in
> > AD. In our company, we have some power users who don't mind seeing
> > command line responses, but there is also a great number who have come
> > to expect a nice crisp screen, with focussed menu viewing areas to
> > respond to, or to find valuable data. One of the answers I found when
> > working with VB scripting was using the HTML Application, where you
> > can create a nice GUI for user commands, or responses, (see the
> > article in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up
> > in a GUI interface",
> > http://www.microsoft.com/technet/scr...s/tutorial1.ms
> > px
> >
> > It would be nice to see this same type of approach with PowerShell.
> > Any ideas if this can be done with PowerShell?
> >
> > Anybody's help would be much appreciated.
> >
> > Thanks -
> >
>
> Take a look at this:
>
> http://www.codeproject.com/useritems...PowerShell.asp
>
> Karl
>
>
>
My System SpecsSystem Spec
Old 09-21-2007   #5 (permalink)
GregHMI


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

Thanks Rich! I did look at PowerGUI, I found it great for developing in, but
I really wanted something simple that could easily be distributed to an
average end user. Almost like VB scripting allows for simple INPUT boxes and
then I could invoke the PowerShell script to return that answer.

"RichS" wrote:
Quote:

> have a look at PowerGUI
>
> www.powergui.org
> --
> Richard Siddaway
> Please note that all scripts are supplied "as is" and with no warranty
> Blog: http://richardsiddaway.spaces.live.com/
> PowerShell User Group: http://www.get-psuguk.org.uk
>
>
> "Karl Mitschke" wrote:
>
Quote:

> > Hello GregHMI,
> >
Quote:

> > > I am fairly new to PowerShell and was looking for a way to take the
> > > scripts I have created in PowerShell and provide a nice GUI interface
> > > for our end users. For example, a screen which would perhaps have a
> > > nice GUI that would ask for an end users response, or a button that
> > > would launch a PowerShell script to find all of the disabled users in
> > > AD. In our company, we have some power users who don't mind seeing
> > > command line responses, but there is also a great number who have come
> > > to expect a nice crisp screen, with focussed menu viewing areas to
> > > respond to, or to find valuable data. One of the answers I found when
> > > working with VB scripting was using the HTML Application, where you
> > > can create a nice GUI for user commands, or responses, (see the
> > > article in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up
> > > in a GUI interface",
> > > http://www.microsoft.com/technet/scr...s/tutorial1.ms
> > > px
> > >
> > > It would be nice to see this same type of approach with PowerShell.
> > > Any ideas if this can be done with PowerShell?
> > >
> > > Anybody's help would be much appreciated.
> > >
> > > Thanks -
> > >
> >
> > Take a look at this:
> >
> > http://www.codeproject.com/useritems...PowerShell.asp
> >
> > Karl
> >
> >
> >
My System SpecsSystem Spec
Old 09-21-2007   #6 (permalink)
Marco Shaw


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

GregHMI wrote:
Quote:

> Thanks Rich! I did look at PowerGUI, I found it great for developing in, but
> I really wanted something simple that could easily be distributed to an
> average end user. Almost like VB scripting allows for simple INPUT boxes and
> then I could invoke the PowerShell script to return that answer.
http://www.primalscript.com/Free_Tools/index.asp

They created an input box.

You can also create something simple from PowerShell directly:

http://www.microsoft.com/technet/scr.../inputbox.mspx

There are some other methods too, but a few don't work so well on
non-Vista (the input box appears *behind* the current shell).

Marco


--
----------------
PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Old 09-21-2007   #7 (permalink)
Karl Mitschke


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

Hello Greg,
Quote:

> Karl,
>
> Thanks for the information. I am not as familar with C# programming,
> but that is very close to what I was looking for. Perhaps I won't be
> able to find something like I mentioned in the Technet article:
> http://www.microsoft.com/technet/scr...s/tutorial1.ms
> px
>
> I may need to get more creative and try working with the information
> you gave me.
>
> Thanks -
>
> Greg
That link I provided will give you the code you need to place behind the
hta application in the link you peovided.

I am thinking of changing my whole approach to the hta model, because of
your link.

Karl


My System SpecsSystem Spec
Old 09-21-2007   #8 (permalink)
Hal Rottenberg


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

GregHMI wrote:
Quote:

> Thanks Rich! I did look at PowerGUI, I found it great for developing in, but
> I really wanted something simple that could easily be distributed to an
> average end user. Almost like VB scripting allows for simple INPUT boxes and
> then I could invoke the PowerShell script to return that answer.
You might want to look a little further at PowerGUI for these reasons:

1. You can distribute your scripts, script nodes etc. as a snapin which can be
easily imported into someone's copy of PowerGUI
2. You can organize the scripts into folders, sort of making your own
application collection.

Now I need to go read that HTA article you mentioned.

--

Hal Rottenberg
Blog: http://halr9000.com
Webmaster, Psi (http://psi-im.org)
Co-host, PowerScripting Podcast (http://powerscripting.net)
My System SpecsSystem Spec
Old 09-21-2007   #9 (permalink)
Hal Rottenberg


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

GregHMI wrote:
Quote:

> viewing areas to respond to, or to find valuable data. One of the answers I
> found when working with VB scripting was using the HTML Application, where
> you can create a nice GUI for user commands, or responses, (see the article
> in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up in a GUI
> interface",
> http://www.microsoft.com/technet/scr...tutorial1.mspx
>
> It would be nice to see this same type of approach with PowerShell. Any
> ideas if this can be done with PowerShell?
You know what would be really cool?

<html>
<head>
<title>test</title>
<HTA:APPLICATION
APPLICATIONNAME="test"
SCROLL="yes"
SINGLEINSTANCE="yes"
Quote:

>
</head>
<body>
<script language="PowerShell">
Get-Process
</script>
</body>
</html>

Does anyone know if such a thing is feasible? What kinda code would need to be
written to make this happen, if it is feasible? Big project? Little project?

--

Hal Rottenberg
Blog: http://halr9000.com
Webmaster, Psi (http://psi-im.org)
Co-host, PowerScripting Podcast (http://powerscripting.net)
My System SpecsSystem Spec
Old 09-21-2007   #10 (permalink)
Brandon Shell


 
 

Re: Wrapping PowerShell Scripts In A GUI Interface

You could something similar using Windows Forms and XML parsing, but I would
guess that would be a big project.

"Hal Rottenberg" <hal@xxxxxx> wrote in message
news:empZUNH$HHA.4828@xxxxxx
Quote:

> GregHMI wrote:
Quote:

>> viewing areas to respond to, or to find valuable data. One of the answers
>> I found when working with VB scripting was using the HTML Application,
>> where you can create a nice GUI for user commands, or responses, (see the
>> article in Microsoft Technet, "Extreme Makeover: Wrap Your Scripts Up in
>> a GUI interface",
>> http://www.microsoft.com/technet/scr...tutorial1.mspx
>>
>> It would be nice to see this same type of approach with PowerShell. Any
>> ideas if this can be done with PowerShell?
>
> You know what would be really cool?
>
> <html>
> <head>
> <title>test</title>
> <HTA:APPLICATION
> APPLICATIONNAME="test"
> SCROLL="yes"
> SINGLEINSTANCE="yes"
Quote:

> >
> </head>
> <body>
> <script language="PowerShell">
> Get-Process
> </script>
> </body>
> </html>
>
> Does anyone know if such a thing is feasible? What kinda code would need
> to be written to make this happen, if it is feasible? Big project?
> Little project?
>
> --
>
> Hal Rottenberg
> Blog: http://halr9000.com
> Webmaster, Psi (http://psi-im.org)
> Co-host, PowerScripting Podcast (http://powerscripting.net)
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
run PowerShell scripts from ASP or asp.net PowerShell
Powershell scripts not working with Vista powershell PowerShell
Can't run powershell scripts PowerShell
how to get rid of line wrapping in powershell PowerShell
Creating Powershell Scripts PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46