John
Take a look at the following should hit most of the boxes you're talking about.
Bellow generates names in the format of Sitecode-machinetype-serialnumber
[Settings]
Priority=DefaultGateway, ByLaptopType, ByDesktopType, ByVMType, ByDomain,
Default
Properties=MyCustomProperty, NameByType, NameByLocation, MachineTypeOU,
MachineTypeOUOld, Domain
[Default]
UserLocale=en-us
UILanguage=en-us
OSInstall=Y
OSDCompname=%NameByLocation%-%NameByType%-#Left("%SerialNumber%",8)#
TimeZoneName=W. Europe Standard Time
KeyboardLocale=en-US;0409:00000409;fr-FR;040c:0000040c;sv-SE;041d:0000041d;de-DE;0407:00000407
[DefaultGateway]
10.0.7.254=NL5
10.0.23.254=NL1
10.0.39.254=NL2
10.2.23.254=SE2
10.12.7.254=DE1
10.14.15.254=FR1
10.14.31.254=CA1
10.14.47.254=US1
10.14.63.254=US2
192.168.201.1=NL4
192.168.201.254=NL4
[US1]
NameByLocation=US1
TimeZoneName=Eastern Standard Time
[US2]
NameByLocation=US2
TimeZoneName=Eastern Standard Time
[ByLaptopType]
Subsection=Laptop-%IsLaptop%
[ByDesktopType]
Subsection=Desktop-%IsDesktop%
[ByVmType]
Subsection=VM-%IsVM%
[Laptop-True]
NameByType=LT
APPLICATIONS001="VPN Client"
MachineTypeOU=Laptops
MachineTypeOUOld=LAPTOPS
[Desktop-True]
NameByType=DT
MachineTypeOU=Desktops
MachineTypeOUOld=WORKSTATIONS
[VM-True]
NameByType=VM
From: [email protected] [mailto:[email protected]] On
Behalf Of Marcum, John
Sent: Thursday, July 25, 2013 9:12 AM
To: SMS List ([email protected])
Subject: [mssms] Complex Computer Naming
In customsettings.ini is it possible to use more than one condition to set
OSDComputerName? Has anyone done something like this?
Here's what I am trying to accomplish.
1. Default gateway?
2. Physical or Virtual?
3. If physical is laptop or is desktop?
4. serial number if physical UUID if virtual
And I want to end up with a name like this;
First 4 character:
default gateway = 10.10.10.10 or 10.10.10.20 - first 4 letters of computer name
are "BHM-"
Next two characters:
Virtual is YES - next two letters of computer name are "V-"
Laptop is Yes - - next two letters of computer name are "L-"
Desktop is Yes - - next two letters of computer name are "D-"
Last characters of computer name:
If physical then "serial number"
if virtual then VM#Right(replace("%UUID%"," ",""),8)#
End result would be something like this:
BHM-D-12345678
JKS-L-12345678
NSV-V-12345678
________________________________
John Marcum
Sr. Desktop Architect
Bradley Arant Boult Cummings LLP
________________________________
________________________________
Confidentiality Notice: This e-mail is from a law firm and may be protected by
the attorney-client or work product privileges. If you have received this
message in error, please notify the sender by replying to this e-mail and then
delete it from your computer.
______________________________________________________________________
This email has been scanned by the IT101 Email Security System.
For more information please visit http://www.it101.be
______________________________________________________________________
________________________________
Any information transmitted by means of this e-mail (and any of its
attachments) is intended exclusively for the addressee(s) and for those
authorized by the addressee(s) to read this message. Any use, dissemination,
distribution or copying of this communication by a party other than the
addressee(s) is strictly prohibited. The information contained in this e-mail
and all attachments may be confidential in nature and fall under a duty of
non-disclosure. If you have received this communication in error, please notify
us immediately by replying to the message and deleting it from your computer.
Plymovent shall not be liable for damages resulting from the use of electronic
means of communication, including -but not limited to- damages resulting from
failure or delay in delivery of electronic communications, interception or
manipulation of electronic communications by third parties or by computer
programs used for electronic communications and transmission of viruses and
other malicious code.