Task Sequence – Gather User Text Input – PowerShell

This is playing off my last post, I was debating having it all in one post, but landed on making two. I get paid per post, so why not?

In this post, I’m going to show how easy it can be to gather user input into a Task Sequence variable, stealing 99% of the code from Microsoft Learn.

Creating a custom input box – PowerShell | Microsoft Learn

This is getting you the same results, allowing you to get user input in string form, then placing that into a TS Variable, it just looks a little nicer.

GitHub Script: garytown/OSD/UserInputDialog.ps1

Here you can see the script running in the Task Sequence. It prompts for user data, and places it into a TS Variable.

In Action

I’ve split up the thing you’d probably want to configure into 3 variables, and you can also change the icon by swapping out the base64 icon data.

Alight, so while I don’t know of when you’d need to use this, at least you can and with style.

GARYTOWN.COM

2 thoughts on “Task Sequence – Gather User Text Input – PowerShell”

  1. how to pass user input like country code–example US, and Desktop -D, set computer name based on country code, desktop + serial number UKD1234567
    how to join to UK Desktop OU

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.