‘vbscriptconst HKEY_LOCAL_MACHINE = &H80000002 Dim oReg, strKeyPath, strValueName, strDisabled, objArgs, strComputer, arrComputersSet objArgs = WScript.Arguments arrComputers = Array(“server1″,”server2”) sOutput = “Logons Enabled(0) or Disabled(1)” & VBCRLF & VBCRLFFor EACH strComputer in arrComputers Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\” & strComputer & “rootdefault:StdRegProv”) strKeyPath = “SoftwareMicrosoftWindows NTCurrentVersionWinlogon” strValueName = “WinStationsDisabled” oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strDisabled sOutput = sOutput & strcomputer & ” ” & […]
‘vbscript – operates like a multimedia keyboards mute keySet WshShell = CreateObject(“WScript.Shell”)WshShell.SendKeys(chr(&hAD))
‘vbscriptOption ExplicitDim WSHShellDim objNTInfoDim GetComputerNameDim xmlConst MetaFrameWinSrvObject = 6Set objNTInfo = CreateObject(“WinNTSystemInfo”)GetComputerName = lcase(objNTInfo.ComputerName)Set WSHShell = WScript.CreateObject(“WScript.Shell”)Set xml=CreateObject(“MetaframeCOM.Metaframeserver”)xml.initialize MetaFrameWinSrvObject,GetComputerName‘xml.initialize MetaFrameWinSrvObject,”servername”xml.WinServerObject.TrustXMLRequests = 1WScript.Quit
REM Hide Altiris icons from system tray‘vbscriptConst HKEY_LOCAL_MACHINE = &H80000002strComputer = “.”Set objReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\” & _ strComputer & “rootdefault:StdRegProv”)objReg.SetDwordValue HKEY_LOCAL_MACHINE,”SOFTWAREAltirisClient Service”,”ShowTrayIcon”,0
‘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
‘vbscriptConst HKEY_LOCAL_MACHINE = &H80000002strComputer = “.”Set objReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\” & _ strComputer & “rootdefault:StdRegProv”) objReg.SetDwordValue HKEY_LOCAL_MACHINE,”SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem”,”EnableLUA”,1
REM Disables IPv6‘vbscriptConst HKEY_LOCAL_MACHINE = &H80000002strComputer = “.”Set objReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\” & _ strComputer & “rootdefault:StdRegProv”) objReg.SetDwordValue HKEY_LOCAL_MACHINE,”SYSTEMCurrentControlSetServicesTcpip6Parameters”,”DisabledComponents”,255
‘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
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