At the moment the script makes only writes the last 14 numbers of the serialnumber and not the "VM-" before and that is what i wan't since I wan't to be able to control VM, DT (Desktop) or LT (Laptop) via customsettings.
Problem is, i don't know how i should handle this in a task sequence, I know that the script work because i created a custom task sequence with two tasks, One with this powershell script and one that writes "notepad.exe %OSDComputerName%" via CMD. So i get the result i wan't, but how to i actually set this to be my computername when i deploy a VM.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hello!
Im trying to create a custom computer name when i deploy computers via MDT. What my goal is for example VM-last14numberofserialnumber.
I have created a script in powershell that almost do what i wan't:
At the moment the script makes only writes the last 14 numbers of the serialnumber and not the "VM-" before and that is what i wan't since I wan't to be able to control VM, DT (Desktop) or LT (Laptop) via customsettings.
Problem is, i don't know how i should handle this in a task sequence, I know that the script work because i created a custom task sequence with two tasks, One with this powershell script and one that writes "notepad.exe %OSDComputerName%" via CMD. So i get the result i wan't, but how to i actually set this to be my computername when i deploy a VM.
It is probaly pretty easy but im out of ideas.
Any tips or help is welcome.
// Anthon
Share this post
Link to post
Share on other sites