What's new

Script Help Needed

  • Thread starter jo15765
  • Start date
  • Views 155
jo15765

jo15765

Enthusiast
Messages
470
Reaction score
73
A VBScript to change MAC Address at reboot? I know you can use this to change the PC Name - how could similar be done to change MAC?
Code:
Dim PCName
PCName = "Change"
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "(impersonationLevel=impersonate)!\\" & strComputer & "\root\cimv2")

Set colComputers = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")
For Each objComputer in colComputers
  err = objComputer.Rename(PCName)
Next
 
Top Bottom