0

Im new to serverfault and my english is not the best...

So, I want to let W10 Setup create an (admin-) user, using this format:

"Name_of_Hardware_Vendor"-User e.g. "DELL-User"

Two questions here: is it possible to use WMIC commands during Setup, like this: WMIC csproduct get Vendor

and how can I manage to get the result from the above query to the autounattend file and section?

thx for your help and best regards

Peter

peter58ha
  • 1
  • 1
  • You can either create an unattend.xml pre-populated to be injected into the image before the node boots, or you can run a script during the unattend processing that creates the user at that time. For the latter, see https://serverfault.com/questions/813992/run-powershell-script-from-server-in-unattend-xml/814423 – Matthew Wetmore May 10 '18 at 20:09

1 Answers1

0

Easy way would be to use a different unattend file based on vendor. Might depend on how your deploying this. I believe you can use WMIC in the WinPE environment like so: https://stackoverflow.com/questions/35617451/how-can-i-use-wmic-in-a-windows-pe-script

So you might be able to create a script to grab vendor and then write to the unattend file.

To query for Vendor with WMIC its just: wmic csproduct get vendor

colbyt
  • 194
  • 1
  • 3
  • 12