Get/Set ComputerName datafile + variable use
Hello's!
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.
1 Comment
[ + ] Show comment
-
Please remove your duplicate post before it receives comments/answers. - anonymous_9363 9 years ago
-
Done, thanks for the info. Don't know why it generated double posts. - Xacken 9 years ago
-
Just one of the charming features of this forum's strange software! :-) - anonymous_9363 9 years ago
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
Xacken
9 years ago