Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Rename a Computer and Computer AccountContent of Rename a Computer and Computer Account.vbsMD5 Hash: 88AE66BC67011564B1CAD5346286F686 |
||
' Description: Renames a computer and its corresponding Active Directory computer account. Requires Windows XP or Windows Server 2003, and must be run on the local computer.
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("WebServer") Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |