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


0 Comments   [ + ] Show comments

Answers (1)

Posted by: Nico_K 4 years ago
Red Belt
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

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

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ