question

jaybird283-2674 avatar image
0 Votes"
jaybird283-2674 asked joem1881-7746 published

OSD Computer name prompt and serial number

I am curious if anyone knows of a way have an OSD task sequence prompt a technician to enter a computer name, but also pre-populate the prompt with the serial number as a default. i would like to avoid using MDT if possible. i think either a wmi query or the _SMSTSSerialNumber variable might be a good way to pull the serial number. but i have no idea where to start on prompting for input and populating the prompt with a serial number. i also assume that the output of the prompt would need to set the OSDComputerName Variable. please correct me if i am wrong.

mem-cm-osd
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GaryBlok avatar image
2 Votes"
GaryBlok answered jaybird283-2674 commented

I'd recommend leveraging something like UI++ https://uiplusplus.configmgrftw.com/
Demo: https://docs.recastsoftware.com/ConfigMgr-Docs/Community-Tools/Community-Tools-UI%2B%2B.html

Once you grab the serial number, you could use that to pre-populate the computer name dialog box, which is similar to the scenario that is covered in that demo link.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This ended up being exactly what i needed. really love this tool now. it looks a little overwhelming at first but then you realize just how simple it really is. love it! Thanks for posting!

1 Vote 1 ·
FionaYan-MSFT avatar image
0 Votes"
FionaYan-MSFT answered FionaYan-MSFT edited

@jaybird283-2674

Thank you for posting in Microsoft Q&A forum.

We could use a PS script combine with serviceui.exe to set the "OSDComputerName" variable to pull the pre-populate serial number.
We need to add one line to the script provided in this article:" $TBComputerName.Text = (Get-WmiObject -Class Win32_BIOS | Select-Object SerialNumber).SerialNumber".
The output image may like below:
67322-image.png


67361-osdcomputernamePS.log

Have a nice day!


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (364.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jaybird283-2674 avatar image
0 Votes"
jaybird283-2674 answered

Wow. thank you both for the great responses! @FionaYan-MSFT i am going to give that script a try. can i just create a package and drop that into the task sequence right after the "apply operating system" step? or could i just add it as a powershell script step?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jaybird283-2674 avatar image
0 Votes"
jaybird283-2674 answered joem1881-7746 published

i just tried it by adding it as a powershell script in the task sequence and it shows its running in the progress bar, but doesn't prompt or do anything. almost looks like it's hung. does my boot media need some extra components installed for that to work?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just following up on this thread. I'm having a similar result with the PS script not prompting as expected. Were you able to get this script working?

0 Votes 0 ·
Jason-MSFT avatar image
0 Votes"
Jason-MSFT answered

For some additional background and information here: https://home.memftw.com/osd-frontends-series/

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.