Hello Brilliant People,
Good day.
I may have a simple query here. The code below generates the hardware ID for Windows Autopilot and I am trying to rename it with the serial number of the machine.
Please let me know if this is possible.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
Set-Location D:\\HWID
.\Get-WindowsAutoPilotInfo.ps1 -OutputFile D:\HWID\AutoPilotHWID.csv
Just need to use the device serial number and output it as the filename :)
Device Serial Number,Windows Product ID,Hardware Hash
BXA6379CYA,,T0HuAgEAHAAAAAoAfwRhSgAACgAIBWFKA9ryKSACCQUCABAACQABAAIABAABAAAABQAZABAAAAAAAAAAEAAAAAAAAAACAAEAAwMAEQBHZW51aW5lSW50ZWwABAA0AEludGVsKFIpIENvcmUoVE0pIGk1LTQzMDBVIENQVSBAIDEuO
Appreciate the response.
You can use
Rename-Item
to rename a file andImport-Csv
to get the Serial from your CSV: