Forum Discussion
UpNorthIntune
Aug 27, 2024Iron Contributor
Automatically configure Windows Autopilot device names using a CSV File
Hello All, Is it possible to upload a CSV file so that the enrolled device pick's up an assigned device name? So, for example, device serial number abc123xyz with get assigned a device name o...
Jan 27, 2025
Then this should work:
if (((Get-WmiObject win32_SystemEnclosure).smbiosassettag -ne $env:COMPUTERNAME)) {
Rename-Computer -NewName ((Get-WmiObject win32_SystemEnclosure).smbiosassettag)
}
How are you deploying this? Platform script or Remediation, Win32App?
UpNorthIntune
Jan 28, 2025Iron Contributor
Hi
Many thanks for the reply.
I am using Platform scripts via Intune.
I seem to be hitting a wall with permissions.
I have tried running the script direct from the laptop, logged in a local admin and still get not enough permission messages.
I used chatgbt to tweak the script several times to try and eradicate the issue, but have been unsuccessful.
And via Intune I just get error.
- Jan 28, 2025
Could you post the output of this? (The log file is in c:\windows\temp after running as Admin)
start-transcript c:\windows\temp\log.txt if (((Get-WmiObject win32_SystemEnclosure).smbiosassettag -ne $env:COMPUTERNAME)) { Rename-Computer -NewName ((Get-WmiObject win32_SystemEnclosure).smbiosassettag) -Verbose } stop-transcript