Whilst developing a working image for standalone laptops where the configuration of accounts shouldn't change, yet must be deployed across a number of assets, I needed to create a method of distributing a system image amongst devices in a way which would avoid static configurations.

Part of this was in the creation of an unattend.xml file for the Windows installation, and using Audit mode to modify the installation and apply system patches to the system image.

Using PowerShell it is possible to rename the Windows PC through some user input. The scriptlet I have used in this example is:

$varHostname = Read-Host "Enter the Laptop Asset ID (e.g. xxxxxxxx)"

$PC = Get-WmiObject -Class Win32_ComputerSystem


When executed through the PowerShell command prompt, the user will be prompted to provide an Asset ID to which the Windows PC will be renamed. Subsequently, the Windows PC needs to be restarted for these changes to occur.