Principale utente con più risposte
Wsus (parte client)

Domanda
-
Buonasera,
ho creato un wsus server (su 2008 r2) per la gestione degli aggiornamenti sulla popolazione aziendale (circa 500 pc).
In azienda non abbiamo dominio, i pc sono tutti amministratori (per questioni che non vi sto a spiegare, ve lo risparmio :) ), quindi dovrei ad ogni "clientwsus" settare da gpedit sia le modalità di aggiornamento sia il server da "puntare". Visto che sarebbe un calvario andare su ogni pc a fare questa operazione mi chiedevo se esiste un comando da prompt per settare su ogni client il server e le condizioni, in modo da creare un batch mandare una email all user e velocizzare il tutto....
chi mi aiuta?
grazie a tutti!!!
- Modificato Masy0 martedì 29 settembre 2015 13:49
Risposte
-
Ciao,
potresti testare questo:
REM Stop the Automatic Updates service net stop wuauserv REM Stop the Windows Management Instrumentation service net stop winmgmt REM Backup ReportingEvents.log. Then, delete the contents of REM %systemroot%\SoftwareDistribution and REM %systemroot%\system32\WBEM\Repository copy %systemroot%\softwaredistribution\reportingevents.log %homedrive%\ del /f /q %systemroot%\softwaredistribution\*.* move %homedrive%\reportingevents.log %systemroot%\softwaredistribution REM Delete SusClientID and AccountDomainSid keys from REM HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate SET WU_KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate reg delete %WU_KEY% /v SusClientID reg delete %WU_KEY% /v AccountDomainSid SET WU_KEY= REM Start the Automatic Updates service net start wuauserv REM Start the Windows Management Instrumentation service net start winmgmt REM Force a group policy update gpupdate /force REM Roll the WU Client... wuauclt /resetauthorization /detectnow
REF: http://superuser.com/questions/502396/batch-file-to-configure-wsus-in-workgroup
This post is provided AS IS with no warranties or guarantees, and confers no rights.
~~~
Questo post non fornisce garanzie e non conferisce diritti- Proposto come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 13:05
- Contrassegnato come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 14:12
-
io invece proverei ad usare questo
@echo off :START cls echo Temporary WSUS Script echo ============================== echo This script will flip between using the internal WSUS server and Microsoft's servers. echo. set /p WSUSSETTING=Type [W] to use WSUS or [C] to clear the setting and use MS servers: IF /i (%WSUSSETTING%) == (W) goto CONTINUE if /i (%WSUSSETTING%) == (C) goto CONTINUE echo. echo Error: Invalid selection pause goto START :CONTINUE echo Stopping Update Services... net stop wuauserv echo Deleting timeout registry entries (Safe to ignore errors)... reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v LastWaitTimeout /f reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v DetectionStartTime /f reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NextDetectionTime /f IF /i (%WSUSSETTING%) == (W) goto USEWSUS IF /i (%WSUSSETTING%) == (C) goto USEMS :USEWSUS echo Changing update server to local WSUS server... reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /t REG_SZ /d "http://[SERVER]:8530" /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /t REG_SZ /d "http://[SERVER]:8530" /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 0 /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /t REG_DWORD /d 3 /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AutoInstallMinorUpdate /t REG_DWORD /d 1 /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /t REG_DWORD /d 1 /f goto COMPLETE :USEMS echo Clearing WSUS update server... reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /f goto COMPLETE :COMPLETE echo Starting Update Services... net start wuauserv :END echo --- echo Complete. pause
ovviamente adattandolo prendendo solo la parte che imposta il server WSUS interno ed aggiungendo la modalità di aggiornamento.
Edoardo Benussi
Microsoft MVP - Directory Services
edo[at]mvps[dot]org- Modificato Edoardo BenussiMVP, Moderator mercoledì 30 settembre 2015 13:16
- Proposto come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 13:06
- Contrassegnato come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 14:12
Tutte le risposte
-
Ciao,
potresti testare questo:
REM Stop the Automatic Updates service net stop wuauserv REM Stop the Windows Management Instrumentation service net stop winmgmt REM Backup ReportingEvents.log. Then, delete the contents of REM %systemroot%\SoftwareDistribution and REM %systemroot%\system32\WBEM\Repository copy %systemroot%\softwaredistribution\reportingevents.log %homedrive%\ del /f /q %systemroot%\softwaredistribution\*.* move %homedrive%\reportingevents.log %systemroot%\softwaredistribution REM Delete SusClientID and AccountDomainSid keys from REM HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate SET WU_KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate reg delete %WU_KEY% /v SusClientID reg delete %WU_KEY% /v AccountDomainSid SET WU_KEY= REM Start the Automatic Updates service net start wuauserv REM Start the Windows Management Instrumentation service net start winmgmt REM Force a group policy update gpupdate /force REM Roll the WU Client... wuauclt /resetauthorization /detectnow
REF: http://superuser.com/questions/502396/batch-file-to-configure-wsus-in-workgroup
This post is provided AS IS with no warranties or guarantees, and confers no rights.
~~~
Questo post non fornisce garanzie e non conferisce diritti- Proposto come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 13:05
- Contrassegnato come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 14:12
-
io invece proverei ad usare questo
@echo off :START cls echo Temporary WSUS Script echo ============================== echo This script will flip between using the internal WSUS server and Microsoft's servers. echo. set /p WSUSSETTING=Type [W] to use WSUS or [C] to clear the setting and use MS servers: IF /i (%WSUSSETTING%) == (W) goto CONTINUE if /i (%WSUSSETTING%) == (C) goto CONTINUE echo. echo Error: Invalid selection pause goto START :CONTINUE echo Stopping Update Services... net stop wuauserv echo Deleting timeout registry entries (Safe to ignore errors)... reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v LastWaitTimeout /f reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v DetectionStartTime /f reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NextDetectionTime /f IF /i (%WSUSSETTING%) == (W) goto USEWSUS IF /i (%WSUSSETTING%) == (C) goto USEMS :USEWSUS echo Changing update server to local WSUS server... reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /t REG_SZ /d "http://[SERVER]:8530" /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /t REG_SZ /d "http://[SERVER]:8530" /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 0 /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /t REG_DWORD /d 3 /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AutoInstallMinorUpdate /t REG_DWORD /d 1 /f reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /t REG_DWORD /d 1 /f goto COMPLETE :USEMS echo Clearing WSUS update server... reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /f goto COMPLETE :COMPLETE echo Starting Update Services... net start wuauserv :END echo --- echo Complete. pause
ovviamente adattandolo prendendo solo la parte che imposta il server WSUS interno ed aggiungendo la modalità di aggiornamento.
Edoardo Benussi
Microsoft MVP - Directory Services
edo[at]mvps[dot]org- Modificato Edoardo BenussiMVP, Moderator mercoledì 30 settembre 2015 13:16
- Proposto come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 13:06
- Contrassegnato come risposta Yordan IvanovMicrosoft contingent staff, Moderator lunedì 5 ottobre 2015 14:12
-
Buongiorno,
in tanto grazie a tutti per le risposte.
seguendo i vostri consigli , in un primo momento sembra funzionare tutto. o meglio il registro effettivamente cambia dinamicamente le chiavi di registro a comando, purtroppo questo non avviene in gpedit (che al variare del registro non cambia) dopo il riavvio naturalmente le impostazioni del gp (che sono rimaste invariate) comandano il registro e tutto torna come prima....
come risolvere?
- Modificato Masy0 giovedì 1 ottobre 2015 07:14
-
hai detto che non hai un dominio windows, che sei in workgroup, quindi non hai domain policies perciò ogni macchina della rete ha solo le local policies ma le local policies sono in gran parte memorizzate nel registro di sistema ossia proprio quello che ti abbiamo fatto cambiare con gli script.
forse mi sta sfuggendo qualcosa...
Edoardo Benussi
Microsoft MVP - Directory Services
edo[at]mvps[dot]org -
-
hai detto che non hai un dominio windows, che sei in workgroup, quindi non hai domain policies perciò ogni macchina della rete ha solo le local policies ma le local policies sono in gran parte memorizzate nel registro di sistema ossia proprio quello che ti abbiamo fatto cambiare con gli script.
forse mi sta sfuggendo qualcosa...
Edoardo Benussi
Microsoft MVP - Directory Services
edo[at]mvps[dot]org
Certo, è proprio cosi'. se avessi avuto un cavolo di dominio :D (meno male che l'azienda non mi sente), potevo editare la policy direttamente dal server wsus, ed ilo gioco era fatto. il problema che il group policy non viene comandato da reg (in workgroup) -
ti ripeto il concetto: le local policies sono proprio contenute nel registro di sistema. usando quegli scripts modifichi il contenuto delle chiavi di registro relative al servizio di windows update perciò non c'è nient'altro che rimetta i valori precedenti.
puoi approfondire l'analisi del fenomeno ?
Edoardo Benussi
Microsoft MVP - Directory Services
edo[at]mvps[dot]org -
ti ripeto il concetto: le local policies sono proprio contenute nel registro di sistema. usando quegli scripts modifichi il contenuto delle chiavi di registro relative al servizio di windows update perciò non c'è nient'altro che rimetta i valori precedenti.
puoi approfondire l'analisi del fenomeno ?
Edoardo Benussi
Microsoft MVP - Directory Services
edo[at]mvps[dot]orggrazie della risposta.
ed è per questo che mi sto "scervellando" , purtroppo per qualche motivo a me non noto, una volta che cambio il registro (naturalmente le gp non si aggiornano se non al prox riavvio) , quando riavvio il registro torna nello stato precedente (quello che si trovavano le gp prima del riavvio).