Home > Articles > Operating Systems, Server > Microsoft Servers

📄 Contents

  1. Scripting the Computer Name
  2. Generating a Computer Name with Script
  3. Listing of COMPNAME.VBS
  • Print
  • + Share This

Generating a Computer Name with Script

In many of the deployments I've worked on, companies use the BIOS service tag or asset tag as part of the naming algorithm. Unfortunately, the out-of-the-box naming mechanisms didn't provide for this type of naming standard. To work around the limited options, I developed a script that uses the Visual Basic Scripting Language and Windows Management Infrastructure (WMI) to query against SerialNumber from Win32_Systemenclosure. For systems using a BIOS that adheres to the SMBIOS standard, this script will pull the system service tag.

Save this script as COMPNAME.VBS. Run the script using CSCRIPT.EXE from the command line (for example, CSCRIPT COMPNAME.VBS). Running this script will create a SYSNAME.INF file in the directory from which the script executes.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.