Newbie needing help with basic input for script

I’ve been using bits and pieces of everything I can find to build a simple GUI menu for a handful of scripts we have. The idea would be when we hit the button on the one we want, it would run a powershell script that prompts us for input and then puts that input into the script and runs it.

I’m not sure if this is even possible, and I’ve exhausted my googling. So one script we use is below it simply checks the last time the password was set on an account. What I’d like is when we hit the button and the script is ran we get a popup asking for user id and then it takes that input and replaces “theusername” piece of the script to look up the user we want. Is there a Powershell name for such a thing? Is this pretty advanced or someone with little Powershell experience like myself could put it together? Appreciate any help you can give me or any sources you’d recommend to look at.

get-aduser -identity theusername -properties passwordlastset | ft Name, passwordlastset

Jam022316,
Weclome to the forum. :wave:t4:

If you keep going this way you will probably realize that it is quite a lot of work to do for such a “simple” thing like a small GUI for some scripts. I am not a fan of those GUIs but you could build a simple text based menu like you see in the SCONFIG tool on Windows Server Core with a little effort.

I’d consider it as pretty advanced. :wink:

Regardless of that: When you post code please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance.

1 Like

There was a post on Reddit a couple of weeks ago announcing a tool that sounds like it might do what you want:

2 Likes

… doesn’t look bad … reminds me a little bit of the Jupyter Notebooks … here are some vedeos about:

Thanks for the welcome! Sorry about the code. :slight_smile: Thanks for the tips.

Thank you that looks like it may do the trick.

Never heard of using notebooks I’ll check it out. You all rock.

There is nothing easy when creating a GUI for/with PowerShell. The command line is quicker

Try: PoshGUI | PowerShell GUI Designer

or Creating a Custom Input Box - PowerShell | Microsoft Docs