Computer name harvesting
I would like to harvest the Dell Service Tag or serial number from the Windows computer and then use it as the computer name plus (for instance: -LTW7. I would like to do when the K2000 assigns the computer name to the box when it runs the Scripted Install.
Are there any scripts out the that do this or ones that I could modify to do this?
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
SMal.tmcc
8 years ago
use the get/set computername
Variables:
$Serial - The serial number of the client machine
$Make - The manufacturer of the client machine or motherboard
$Model - The model of the client machine or motherboard
$Chassis - The chassis type of the client machine
$Asset - The asset tag of the client machine
$OS - The OS version of the client machine (W7,WXP,W2K8,etc)
$Arch - The OS architecture of the client machine
$Mac - The MAC address of the active NIC
Usage examples:
setcomputername.exe /name:$OS$Arch-$Serial will set the computer name to W7X64-1234567
setcomputername.exe /name:KACE-$Asset will set the computer name to KACE-Assettag
The name will automatically be truncated to 15 characters and any non-compliant characters will be removed (underscore, ampersand, etc)
Posted by:
bfrakes
8 years ago
Placed the first example above in the script and it did not work.
Got the standard KBOX: ROBERT-SAGJMZ4P generate computer name.
What did I do wrong?
Comments:
-
do you have <ComputerName>*</ComputerName> in your answer file. It needs to find this to replace it with the variable - SMal.tmcc 8 years ago
Posted by:
bfrakes
8 years ago