Get/Set ComputerName datafile + variable use
05/20/2015 1464 views
We have a IT policy that says the computer names should be set to "LT/PC-Serialnumber" depending on if it's a laptop or a stationary computer.
Currently we're manually setting the LT/PC part with the setcomputername /dialog, with get-computername that is grasping the serialnr for us, but with an extra "D" in front of the serialnr for some reason.
It would be awesome to have this fully automatic, after checking the recent get/setcomputername version i found that you can use a datafile. Tried using a datafile that checks for the model to decide if it's a laptop or stationary and therafter using $serial, which seems like a no go, see below.
Running set computername like; setcomputername.exe /rdf:computernames.txt /dfk:$Model
Having only this in my test computernames.txt;
OPT 790 = PC-$Serial
Has anyone managed to set up something similar? Any tips would be appreciated!
I'm sorry if the explanation isn't the best. I'll try explaining myself further if needed.
Answer Chosen by the Author
Please log in to answer
Found this which has the ability to modify $Chassi output to preferred values, problem solved!
Answered 05/20/2015 by: Xacken