K2000 Set computer name add variable by IP range/chassis type?
I'm pretty new to KACE and first question to this forum.
We are currently using the SetComputerName post install task with the $Serial variable appended to the required naming convention. Example, SetComputerName_x64.exe /name:DE-DT-$Serial, SetComputerName_x64.exe /name:DE-LT-$Serial. Problem is, we have 10 sites using a standard image but I need to create multiple images because of the required naming convention. These images are synced to the corresponding site RSA.
I'd really like to automate the naming script completely so that all of our sites can use the same one and I can reduce the amount of data I need to synchronize.
Our inventory is named by location-chassis-serial, (DE-LT-ABC1234) so I'm wondering if anyone knows how to assign multiple variables defining the terminology below and apply it to the naming script.
IP Range: 10.3.1.x.x=DE
IP Range: 10.4.1.x.x=TO
IP Range: 10.5.1.x.x=SJ
Chassis type: Laptop=LT
Chassis type: Desktop=DT
Thanks!
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
Nico_K
7 years ago
you can write a wrapping script which checks the IP.
Something like:
@echo off
for /f "Tokens=2 Delims=[] skip=1" %%i in ('ping -n 1 %computername%') do set IPAdress=%%i
for /f "Tokens=2 Delims=[] skip=1" %%i in ('ping -n 1 %computername%') do set IPAdress=%%i
and set the results to the SetComputerName command.
$chassis is the variable for the Chassistype, which you can find in the readme.txt inside the zip file you downloaded for this task. Or if you don't have it handy anymore you can download it here: https://support.quest.com/kb/153359
$chassis is the variable for the Chassistype, which you can find in the readme.txt inside the zip file you downloaded for this task. Or if you don't have it handy anymore you can download it here: https://support.quest.com/kb/153359