Powershell and Forms (part 1)

Using Powershell to create forms

I know this goes against the rules of scripting but I find this part of Powershell very useful if you are creating scripts for users that don’t know much about Powershell.  It also gives us the ability to restrict users in the commands they can run (and potentially save you from their errors).  So here is a little script to test and explain how to use Powershell to create forms.  There are applications out there that allow you to do all this and package it to create applications.

Have fun playing with the script and I will post more later this month.

5 comments

  1. Very nice post. I just stumbled uρon уour weblοg and wanted
    to say that I’ve reallʏ enjoyed browsing your blog posts.

    After all I will be subscribing to your rss feed and I hope you write
    again soon!

  2. Following on from Larry’s comment – changing line 6 to :

    $MyDropDownList = (Get-Service |Sort-Object displayname | select displayname).displayname

    will list all the services on a system in alphabetical order

  3. Adding the .displayname to line 6 gives a null result (nothing to select in dropdown). Removing .displayname provides dropdown elements of the form “@{DisplayName=Internet Explorer EKW Collector Service}”.

    Note in my case, I had to change “i*” to “I*”.
    — however that didn’t take away anything from the nice form example.

    1. Hi,Great ! I have the same problem with svrciee request in SCSM. I use PowerShell for update my svrciee request, then I update my review activities, then I update my runbook automation activies and my runbook Orchestrator do not start !Any help on how resolve this probleme without powershell ? Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *