Set WshShell = WScript.CreateObject(“WScript.Shell”)‘ Acceleration Levels go from 0 to 5. 0=full, 5=noneintAccelLevel = 0strInputString = WScript.StdIn.ReadLineintStartLocation = instr(1, strInputString,”SystemCurrentControlSet”)strPartKey = right(strInputString, len(strInputString) – intStartLocation +1)strNewKey = strPartKey & “Acceleration.Level”WshShell.RegWrite strNewKey, intAccelLevel,”REG_DWORD”
‘ Change the Computers SNMP DescriptionstrSNMPMod = inputbox(“Enter a Computers SNMP Location”,””)oshell.RegWrite “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSNMPParametersRFC1156AgentsysLocation”, strSNMPMod , “REG_SZ”set oshell=nothing
‘ Section to interrogate the servers Serial number, trim the spaces then call dnscmd.exe to add the ilo%servername% as an alias to ilo%serialnumber% strComputer = “.” Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”) Set colBIOS = objWMIService.ExecQuery _ (“Select * from Win32_BIOS”) For each objBIOS in colBIOS strSerial = objBIOS.SerialNumber Next […]
The below script will find the adapter called “Local Area Connection” and give is a dnssearchsuffix of mydomainname.com ‘Change the Computers DNS Search Suffix DNSDomain = “mydomainname.com” NetConnName = “Local Area Connection” strComputer = “.” Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”) Set colItems = objWMIService.ExecQuery _ (“Select […]
‘ Change the Computers Current Computer Description Set oShell = CreateObject(“Wscript.Shell”)strDescriptionMod = inputbox(“Enter a New Computer Description”,””)oshell.RegWrite “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameterssrvcomment”, strDescriptionMod, “REG_SZ”
I had a senario the other day where I needed to synchronise the DHCP reservations on one W2008 domain controller to another W2008 for the same scopes (but each DC offered differnet IP’s from those scopes as per Microsoft’s 80/20 rule) Microsoft offers the netsh command from the command line to make life easier for us poor […]
Description: Terminal server clock is disabled by default Resolution: [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerStuckRects2] “Settings”=hex:28,00,00,00,ff,ff,ff,ff,02,00,00,00,03,00,00,00,3c,00,00,00,1e, 00,00,00,fe,ff,ff,ff,e4,03,00,00,02,05,00,00,02,04,00,00 URLReference: http://www.petri.co.il/forums/showthread.php?t=18286