Aussie owned and operated, with 23+ years of industry experience, Gold Coast InfoTech is delighted to support all of your business technology requirements.

Gallery

Contacts

success@goldcoastinfotech.com.au

1800 291 071

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: set local administrator proxy

‘vbscriptConst HKEY_CURRENT_USER = &H80000001strComputer = “.”Set objReg = GetObject(“winmgmts:\” & strComputer & “rootdefault:StdRegProv”) objReg.SetDWORDValue HKEY_CURRENT_USER,”SoftwareMicrosoftWindowsCurrentVersionInternet Settings”,”ProxyEnable”,1objReg.SetStringValue HKEY_CURRENT_USER,”SoftwareMicrosoftWindowsCurrentVersionInternet Settings”,”ProxyServer”,”proxy:port”objReg.SetStringValue HKEY_CURRENT_USER,”SoftwareMicrosoftWindowsCurrentVersionInternet Settings”,”strValue “, “<local>”objReg.SetDWORDValue HKEY_CURRENT_USER,”SoftwareMicrosoftWindowsCurrentVersionInternet Settings”,”EnableAutodial”,0

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: remote task manager

‘requries pslist.exe from sysinternals (http://technet.microsoft.com/en-us/sysinternals/bb545021) Set wshShell = Wscript.CreateObject (“WScript.shell”)        strProfile =     inputbox(“Enter Computer Name”,”Enter Computer Name”)        wshshell.run “cmd.exe /c pslist.exe -s 30 -r 1 \” & strprofile        set wshshell = nothing

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: Folder exists on multiple servers

 Dim strFolder        Dim arrServers        Dim strProfile        strProfile = “C$usersadministrator” arrComputers =     Array(“server1″,”server2”)        Set objFSO = CreateObject(“Scripting.FileSystemObject”)        sOutput=”Script Results for:” & strprofile & vbcrlf & vbcrlf                For EACH strComputer in arrComputers        sOutput = sOutput & objFSO.FolderExists (“\”& strComputer & strProfile) & vbtab & strComputer & vbcrlf        On Error Resume Next                        Next        wscript.echo sOutput

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: File exists on multiple servers

 Dim strFolder        Dim arrServers        Dim strProfile‘example of file path        strProfile = “C$WindowsSysWOW64MacromedFlashflash10v.ocx” arrComputers =     Array(“server1″,”server2”)        Set objFSO = CreateObject(“Scripting.FileSystemObject”)        sOutput=”Script Results for:” & strprofile & vbcrlf & vbcrlf                For EACH strComputer in arrComputerssOutput = sOutput & objFSO.FileExists (“\”& strComputer & strProfile) & vbtab & strComputer & vbcrlf              On Error Resume Next                        Next        wscript.echo sOutput

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: Check File Version on multiple Servers

 Dim strFolder        Dim arrServers        Dim strProfile      strProfile = “C$WindowsSysWOW64MacromedFlashflash10v.ocx”       arrComputers =     Array(“server1″,”server2”)        Set objFSO = CreateObject(“Scripting.FileSystemObject”)        sOutput=”Script Results for:” & strprofile & vbcrlf & vbcrlf                For EACH strComputer in arrComputers sOutput = sOutput & objFSO.GetFileVersion (“\”& strComputer & strProfile) & vbtab & strComputer & vbcrlf        On Error Resume Next                        Next        wscript.echo sOutput

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: add DNS Suffixes

‘vbscript Set Append DNS Suffixes (in order)On Error Resume Next strComputer = “.” arrNewDNSSuffixSearchOrder = Array(“internal.domain.local.1”, “internal.domain.local.2”)Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”) Set objNetworkSettings = _ objWMIService.Get(“Win32_NetworkAdapterConfiguration”)intSetSuffixes = _ objNetworkSettings.SetDNSSuffixSearchOrder(arrNewDNSSuffixSearchOrder)