die einträge mach ich mit einem .vbs-script
' Definitione der Variablen und Arrays==========
Dim itmx
DIM intz
Dim counters(200)
Dim objShell
Dim intWarten
intWarten = 10000 ' in Millisekunden
'############### START: Anpassen der Registrierungswerte für alle in der Datei Rechner.txt aufgelistenen Rechner
Const ForReading = 1
itmx=0
'Open the File System Object to Feed the Script
Set objFSO = CreateObject("Scripting.FileSystemObject")
'This line needs to be customized for the servers.txt localtion text file
Set objTextFile = objFSO.OpenTextFile ("rechner.txt", ForReading)
'Starts the process reading thru the input file line by line until EOF
Do Until objTextFile.AtEndOfStream
counters(itmx) = objTextFile.ReadLine
'Wscript.Echo " Computer Name From TXT File : "& strComputer
'Wscript.Echo " counters : " & counters(itmx)
'Registrierungseinträge hinzufügen
Const HKEY_LOCAL_MACHINE = &H80000002
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
counters(itmx) & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "ElevateNonAdmins"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "TargetGroupEnabled"
dwValue = 0
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "WUServer"
strValue = "http://172.16.1.160"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "WUStatusServer"
strValue = "http://172.16.1.160"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "AUOptions"
dwValue = 4
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "AutoInstallMinorUpdates"
dwValue = 0
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "DetectionFrequency"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "DetectionFrequencyEnabled"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAUAsDefaultShutdownOption"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAUShutdownOption"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAutoRebootWithLoggedOnUsers"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAutoUpdate"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RebootRelaunchTimeout"
dwValue = 10
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RebootRelaunchTimeoutEnabled"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RebootWarningTimeout"
dwValue = 5
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RebootWarningTimeoutEnabled"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RescheuduleWaitTime"
dwValue = 10
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RescheuduleWaitTimeEnabled"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "ScheduledInstallDay"
dwValue = 2
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "ScheduledInstallTime"
dwValue = 8
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "ScheduleInstallDay"
dwValue = 2
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "ScheduleInstallTime"
dwValue = 8
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "UseWUServer"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "AUOptions"
dwValue = 4
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "AUState"
dwValue = 2
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "BalloonType"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "ConfigVer"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "OfflineDetectionTime"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "ResetAU"
dwValue = 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "ScheduledInstallDay"
dwValue = 2
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\Currentversion\WindowsUpdate\Auto Update"
strValueName = "ScheduledInstallTime"
dwValue = 8
oReg.SetDWordValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
itmx=itmx + 1
On Error Resume Next
'Bind to the WMI \root\cimv2
'Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Loop
Wscript.Echo "Die Registrierungswerte der Clients wurden angepaßt. Bitte 10 Sekunden warten."
'############### END: Anpassen der Registrierungswerte für alle in der Datei Rechner.txt aufgelistenen Rechner
'############### START: Warteschleife von 10 Sekunden
WScript.Sleep intWarten
Set objShell = Wscript.CreateObject("Wscript.Shell")
'############### END: Warteschleife von 10 Sekunden
'############### START: Beenden des Dienstes Automatische Updates (WUAUSERV) und setzen des Dienstes auf automatischen Start
Const ForReading1 = 1
itmx=0
'Open the File System Object to Feed the Script
Set objFSO = CreateObject("Scripting.FileSystemObject")
'This line needs to be customized for the servers.txt localtion text file
Set objTextFile = objFSO.OpenTextFile ("rechner.txt", ForReading1)
'Starts the process reading thru the input file line by line until EOF
Do Until objTextFile.AtEndOfStream
counters(itmx) = objTextFile.ReadLine
strService = "wuauserv"
Set objWMI = GetObject ("winmgmts:\\" & counters (itmx))
Set objService = objWMI.Get ("WIN32_Service='"& strService & "'")
rv = objService.ChangeStartMode("Automatic")
rv = objService.StopService
itmx=itmx + 1
On Error Resume Next
Loop
Wscript.Echo "Der Dienst Automatische Updates wurde auf allen in der Datei Rechner.txt eingetragenen Servern beendet. Bitte 10 Sekunden warten."
'############### END: Beenden des Dienstes Automatische Updates (WUAUSERV) und setzen des Dienstes auf automatischen Start
'############### START: Warteschleife von 10 Sekunden
WScript.Sleep intWarten
Set objShell = Wscript.CreateObject("Wscript.Shell")
'############### END: Warteschleife von 10 Sekunden
'############### START: Beenden des Dienstes Automatische Updates (WUAUSERV)
Const ForReading2 = 1
itmx=0
'Open the File System Object to Feed the Script
Set objFSO = CreateObject("Scripting.FileSystemObject")
'This line needs to be customized for the servers.txt localtion text file
Set objTextFile = objFSO.OpenTextFile ("rechner.txt", ForReading2)
'Starts the process reading thru the input file line by line until EOF
Do Until objTextFile.AtEndOfStream
counters(itmx) = objTextFile.ReadLine
strService = "wuauserv"
Set objWMI = GetObject ("winmgmts:\\" & counters (itmx))
Set objService = objWMI.Get ("WIN32_Service='"& strService & "'")
rv = objService.ChangeStartMode("Automatic")
rv = objService.StartService
itmx=itmx + 1
On Error Resume Next
Loop
Wscript.Echo "Der Dienst Automatische Updates wurde auf allen in der Datei Rechner.txt eingetragenen Servern gestartet."
'############### END: Starten des Dienstes Automatische Updates (WUAUSERV).