Windows automatic update all users

Автоматизация управления патчами в Windows, часть 1.

В этой статье, состоящей из трех частей, я подробно расскажу о Microsoft Software Update Services (SUS), включая установку, администрирование и обслуживание. Также я расскажу о бесплатных и коммерческих альтернативах управления патчами и почему определенные решения могут подойти, а могут и не подойти для вашей организации.

Jonathan Hassell, перевод Михаил Разумов

Управление патчами можно назвать проклятием каждого системного администратора, уязвимым местом управления системой и непрекращающейся головной болью IT менеджера.

Я уверенно использую термин «управление». На момент написания этой статьи, более 40 обновлений необходимо было применить к новому компьютеру, на котором запущена Windows XP. Более 20 обновлений нужно было применить для систем с Windows 2000 Service Pack 3 до того, как Microsoft выпустила четвертый сервиспак летом 2003 г. Учитывая это постоянно растущее множество обновлений безопасности, исправлений ошибок, критических обновлений и патчей, может быть проще отсоединить все компьютеры от Internet, чем внедрять новые системы?

Конечно, это нереально. На данный момент существует несколько способов распространения и установки обновлений:

  • установка вручную
  • использование механизмов, предоставленных Microsoft
  • инвестирование средств в системы распространения и установки обновлений третьих компаний

В этой статье, состоящей из трех частей, я подробно расскажу о Microsoft Software Update Services (SUS), включая установку, администрирование и обслуживание. Также я расскажу о бесплатных и коммерческих альтернативах управления патчами и почему определенные решения могут подойти, а могут и не подойти для вашей организации.

Software Update Services

Технология Microsoft Windows Update – программное обеспечение, которое представляет собой универсальный сайт обновлений для всех версий Windows, кроме самых старых – реализована в SUS. На данный момент SUS ограничен только критическими обновлениями и сервис паками, позволяя администраторам упростить установку этих патчей на серверы Windows 2000 или Windows Server 2003, а также на рабочие станции Windows 2000 Professional или Windows XP Professional. Он лучше всего работает в сетях, где реализована Active Directory, но может функционировать и без нее. Как вы увидите здесь, в целом Software Update Services – не идеальный инструмент, с ограниченной функциональностью, недостаточно гибкий, но он имеет два больших плюса: он своевременен и работает достаточно хорошо.

Для использования SUS, требуется по крайней мере один сервер, подключенный к Интернет, выполняющий серверную часть SUS. Этот компьютер работает как локальная версия публичного сайта Windows Update, содержащая критические обновления и сервис паки для всех поддерживаемых операционных систем. Этот сервер синхронизируется с публичным сайтом Windows Update по расписанию, которое вы, как администратор, выбираете, и затем вы утверждаете (approve) или отвергаете доступность определенных обновлений на сервере SUS.

Automatic Updates – возможность, доступная в Windows 2000 Service Pack 3 и выше или Windows XP Professional SP1, является клиентской частью SUS. Направляемые модификацией ключа реестра или применением групповой политики, клиентские компьютеры, на которых запущена служба Automatic Updates, соединяются по установленному расписанию с локальным сервером SUS для загрузки обновлений, подходящих для них. Сервер SUS анализирует операционную систему, сервис пак и установленные в данный момент обновления и предлагает только те обновления, которые нужны и предварительно утверждены администратором.

Есть несколько стадий установки SUS, хорошо описанных в документе Microsoft под названием «Software Update Services Deployment White Paper». Поскольку установка и начальная конфигурация довольно просты, я коротко пройдусь по инструкции, местами упрощая ее язык, и укажу на некоторые проблемы, с которыми мне пришлось столкнуться.

Синхронизация и утверждение содержимого

Когда вы запустите процесс синхронизации содержимого, сервер SUS обращается либо к публичным серверам Windows Update, либо к другому локальному серверу SUS (в зависимости от того, как задано в секции Set Options) и скачивает весь набор имеющихся критических обновлений и сервис паков для всех языков, которые вы выбрали. В процессе этой синхронизация обычно скачивается около 150 Mb данных для английских версий обновлений и около 600 Mb обновлений для каждой локализованной версии.

Для синхронизации содержимого, зайдите на сайт управления SUS, и затем:

  1. В левой навигационной панели нажмите Synchronize server.
  2. Нажмите кнопку Synchronize now в правой панели, чтобы начать синхронизацию.

Вы можете также решить запланировать автоматические синхронизации, тогда вам не придется помнить о ре-синхронизации каждый раз, когда выйдет новое обновление, а это происходит довольно часто. На странице Synchronize нажмите Synchronization schedule, установите параметры по своему усмотрению и нажмите ОК. Знайте, что если сервер SUS не сможет соединиться с соответствующим источником обновлений, он повторит попытки четыре раза через каждые полчаса.

Теперь, когда у вас есть актуальный набор обновлений на сервере SUS, вы можете утвердить каждое обновление отдельно для установки на клиентские машины в вашей сети. Чтобы начать процедуру утверждения обновлений, в навигационной панели нажмите Approve updates, а затем в правой панели выберите обновления, которые вы хотите утвердить, и нажмите Approve, когда закончите.

Установка клиента Automatic Updates

Вы можете установить обновленного клиента Automatic Updates на клиентские компьютеры, установив его из соответствующего MSI пакета, обновив с помощью старой утилиты Critical Update Notification (CUN), установив Windows 2000 Service Pack 3 или 4, установив Windows XP Service Pack 1, или установив Windows Server 2003.

Поскольку программа установки клиента представлена в формате MSI, вы можете легко установить клиентскую часть с помощью групповой политики. Для этого создайте новый GPO, назначьте его своим компьютерам, и позвольте клиентам установиться автоматически. Программа установится в контексте локального компьютера, так что убедитесь, что authenticated users имеют право на чтение пакета установки. Вы можете также установить клиентский MSI с помощью логон-скрипта, вызывая MSIEXEC с именем файла клиентской программы и аргументами.

Есть четыре варианта конфигурирования с использованием Group Policy:

  • Configure Automatic Updates (Конфигурировать Автоматические Обновления): Эта опция определяет, будет ли этот компьютер получать обновления безопасности и исправления ошибок. Первая опция позволяет уведомлять текущего пользователя перед загрузкой обновлений и вновь уведомлять перед установкой загруженных обновлений. Вторая опция позволяет автоматически загружать обновления, но не устанавливать их, пока текущий пользователь не разрешит установку. Третья опция позволяет автоматически загружать и устанавливать обновления по расписанию, которое вы можете установить в соответствующих полях.
  • SpecifyintranetMicrosoftupdateservicelocation (Задать внутренний адрес сервисаMicrosoftupdate): Эта опция указывает на сервер SUS, с которого загружать обновления. Чтобы использовать эту опцию, вы должны задать значения имени сервера (которые могут быть одинаковы): сервер, на котором клиент Automatic Updates проверяет и с которого загружает обновления, и сервер, на который обновленные рабочие станции записывают статистику.
  • RescheduleAutomaticUpdatesscheduledinstallations (Перепланировать запланированную установкуAutomaticUpdates): Эта опция определяет время после загрузки системы, по истечении которого продолжается запланированная установка, пропущенная ранее. Если статус установлен в Enabled, пропущенная установка начнется через заданное количество минут после загрузки компьютера. Если статус Disabled или Not Configured, пропущенная установка будет просто отложена до следующей установки по расписанию.
  • Noauto-restartforscheduledAutomaticUpdatesinstallations (Выключить автоматическую перезагрузку после запланированной установки Automatic Updates): Эта опция определяет, должны ли клиентские компьютеры автоматически перезагружаться, когда только что установленное обновление требует перезагрузки системы. Если статус установлен в Enabled, Automatic Updates не будет автоматически перезагружать компьютер после запланированной установки, если на компьютере работает пользователь, вместо этого пользователю будет предложено перезагрузить компьютер для завершения установки. Если статус установлен в Disabled или Not Configured, Automatic Updates предупредит пользователя, что компьютер автоматически перезагрузится через 5 минут для завершения установки.
Читайте также:  Mac os разделение окон

Чтобы изменить некоторые из этих настроек через реестр, используйте следующее руководство:

  • Чтобы включить или отключить Automatic Updates: создайте параметр NoAutoUpdate в ключе HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Значение типа DWORD с возможными значениями 0 (включено) и 1 (отключено).
  • Чтобы сконфигурировать загрузку обновлений и уведомление: создайте параметр AUOptions в ключе HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Его значение типа DWORD может быть одним из значений 2 (уведомить о загрузке и уведомить перед установкой), 3 (автоматически загружать и уведомить перед установкой), 4 (автоматически загружать и запланировать установку)
  • Чтобы запланировать автоматическую установку: создайте параметры ScheduledInstallDay и ScheduledInstallTime в ключе HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Типа значений для каждого – DWORD. Для ScheduledInstallDay диапазон значений от 0 до 7, где 0 означает каждый день, а 1-7 соответствуют дню недели с воскресенья по субботу соответственно. Для ScheduledInstallTime диапазон значений 0-23, в соответствии с номером часа в сутках.
  • Чтобы задать определенный серверSUS для использования клиентом Automatic Updates: создайте значение UseWUServer в ключе HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Значение типа DWORD; установите его в 1 для задания своего имени сервера SUS. Затем, создайте в HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate параметры WUServer и WUStatusServer типа Reg_SZ, и задайте имена (с http://) в качестве значений.
  • Чтобы задать, сколько ждать перед завершением пропущенной установки: создайте значение RescheduleWaitTime в ключе HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Значение типа DWORD от 1 до 60, измеряется в минутах.
  • Чтобы задать, перезагружать ли компьютер после запланированной установки при работающем в данный момент пользователе с неадминистративными правами: создайте параметр NoAutoRebootWithLoggedOnUsers в ключе HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Значение типа DWORD, которое может быть нулевым, что означает, что перезагрузка обязательна, и единицей, что означает, что перезагрузка будет отложена до тех пор, пока пользователь не выйдет из системы.

Вы можете использовать файл реестра, аналогичный приведенному ниже, чтобы автоматизировать изменения реестра. Вы можете модифицировать этот файл согласно приведенной выше инструкции.

Windows Registry Editor Version 5.00

Вы можете даже создать MSI пакет для распространения настроек реестра SUS. Вы можете распространить изменения через .exe или .msi на компьютеры вне домена. К тому же, вы можете использовать апплет Add/Remove Programs в Control Panel для удаления настроек. В конце концов, их легко создать, используя бесплатную WinInstall LE, которая доступна с CD Windows 2000 Server. Также существуют инструменты третьих фирм для создания установочных пакетов.

Далее

Как я упоминал в начале статьи, SUS хорош отчасти своей ценой (он бесплатен), но ему не хватает нескольких возможностей, которые имеют другие продукты управления патчами, таких как:

  • Поддержки для легкого и удобного анализа логов
  • Мультиплатформенное покрытие
  • Обновление приложений и серверных программ совместно с самой операционной системой.

Есть пути обхода, по крайней мере, первого ограничения, и во второй части статьи я расскажу о паре способов и их недостатках для анализа информации из лог-файлов. Я также опишу несколько общих проблем и как их обойти, а также как контролировать статус клиентских загрузок и установок.

Configure Automatic Updates by Using Group Policy

When you configure the Group Policy settings for WSUS, use a Group Policy object (GPO) linked to an Active Directory container appropriate for your environment. Microsoft does not recommend editing the Default Domain or Default Domain Controller GPOs to add WSUS settings.

In a simple environment, link the GPO with the WSUS settings to the domain. In more complex environment, you might have multiple GPOs linked to several organizational units (OUs), which enables you to have different WSUS policy settings applied to different types of computers.

After you set up a client computer, it will take a few minutes before it appears on the Computers page in the WSUS console. For client computers configured with an Active Directory-based GPO, it will take about 20 minutes after Group Policy refreshes (that is, applies any new settings to the client computer). By default, Group Policy refreshes in the background every 90 minutes, with a random offset of 0 to 30 minutes. If you want to refresh Group Policy sooner, you can go to a command prompt on the client computer and type: gpupdate /force.

On client computers running Windows 2000, you can type the following at a command prompt: secedit /refreshpolicy machine_policy enforce.

The following is a list of the Group Policy options available for configuring WSUS-related items in the environment.

In WindowsВ 2000, Group Policy Object Editor is known as Group Policy Editor. Although the name changed, it is the same tool for editing Group Policy objects. It is also commonly referred to as gpedit.

Load the WSUS Administrative Template

Before you can set any Group Policy options for WSUS, you must ensure that the latest administrative template has been loaded on the computer used to administer Group Policy. The administrative template with WSUS settings is named Wuau.adm. Although there are additional Group Policy settings related to the Windows Update Web site, all the new Group Policy settings for WSUS are contained within the Wuau.adm file.

Читайте также:  Anti spy from windows

If the computer you are using to configure Group Policy has the latest version of Wuau.adm, you do not need to load the file to configure settings. The new version of Wuau.adm is available on WindowsВ XP with Service Pack 2. Administrative templates files are stored by default in the %windir%\Inf directory.

You can find the correct version of Wuau.adm on any computer having the WSUS-compatible Automatic Updates installed. You can use the old version of Wuau.adm to initially point Automatic Updates to the WSUS server in order to self-update. After the Automatic Updates self-updates, the new Wuau.adm file appears in the %windir%\Inf folder.

If the computer you are using to configure Group Policy does not have the latest version of Wuau.adm, you must first load it by using the following procedure.

To add the WSUS Administrative Template

In Group Policy Object Editor, click either of the Administrative Templates nodes.

On the Action menu, click Add/Remove Templates.

Click Add.

In the Policy Templates dialog box, select Wuau.adm, and then click Open.

In the Add/Remove Templates dialog box, click Close.

Configure Automatic Updates

The settings for this policy enable you to configure how Automatic Updates works. You must specify that Automatic Updates download updates from the WSUS server rather than from Windows Update.

To configure the behavior of Automatic Updates

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Configure Automatic Updates.

Click Enabled and select one of the following options:

  • Notify for download and notify for install. This option notifies a logged-on administrative user prior to the download and prior to the installation of the updates.
  • Auto download and notify for install. This option automatically begins downloading updates and then notifies a logged-on administrative user prior to installing the updates.
  • Auto download and schedule the install. If Automatic Updates is configured to perform a scheduled installation, you must also set the day and time for the recurring scheduled installation.
  • Allow local admin to choose setting. With this option, the local administrators are allowed to use Automatic Updates in Control Panel to select a configuration option of their choice. For example, they can choose their own scheduled installation time. Local administrators are not allowed to disable Automatic Updates.

Click OK.

Specify Intranet Microsoft Update Service Location

The settings for this policy enable you to configure a WSUS server that Automatic Updates will contact for updates. You must enable this policy in order for Automatic Updates to download updates from the WSUS server.

Enter the WSUS server HTTP(S) URL twice, so that the server specified for updates is also used for reporting client events. For example, type **http(s)://**servername in both boxes. Both URLs are required.

To redirect Automatic Updates to a WSUS server

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Specify Intranet Microsoft update service location.

Click Enabled and type the HTTP(S) URL of the same WSUS server in the Set the intranet update service for detecting updates box and in the Set the intranet statistics server box. For example, type http(s)://servername in both boxes.

Click OK.

Enable Client-side Targeting

This policy enables client computers to self-populate computer groups that exist on the WSUS server.

If the status is set to Enabled, the specified computer group information is sent to WSUS, which uses it to determine which updates should be deployed to this computer. This setting is only capable of indicating to the WSUS server which group the client computer should use. You must actually create the group on the WSUS server.

If the status is set to Disabled or Not Configured, no computer group information will be sent to WSUS.

To enable client-side targeting

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Enable client-side targeting.

Click Enabled and type the name of the computer group in the box.

Click OK.

Reschedule Automatic Update Scheduled Installations

This policy specifies the amount of time for Automatic Updates to wait, following system startup, before proceeding with a scheduled installation that was missed previously.

If the status is set to Enabled, a scheduled installation that did not take place earlier will occur the specified number of minutes after the computer is next started.

If the status is set to Disabled, a missed scheduled installation will occur with the next scheduled installation.

If the status is set to Not Configured, a missed scheduled installation will occur one minute after the computer is next started.

This policy applies only when Automatic Updates is configured to perform scheduled installations of updates. If the Configure Automatic Updates policy is disabled, this policy has no effect.

To reschedule Automatic Update scheduled installation

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Reschedule Automatic Update scheduled installations, click Enable, and type a value in minutes.

Click OK.

No Auto-restart for Scheduled Automatic Update Installation Options

This policy specifies that to complete a scheduled installation, Automatic Updates will wait for the computer to be restarted by any user who is logged on, instead of causing the computer to restart automatically.

Читайте также:  Таблица mbr разделов невозможно установить windows 10 efi

If the status is set to Enabled, Automatic Updates will not restart a computer automatically during a scheduled installation if a user is logged on to the computer. Instead, Automatic Updates will notify the user to restart the computer in order to complete the installation.

Be aware that Automatic Updates will not be able to detect future updates until the restart occurs.

If the status is set to Disabled or Not Configured, Automatic Updates will notify the user that the computer will automatically restart in 5 minutes to complete the installation.

This policy applies only when Automatic Updates is configured to perform scheduled installations of updates. If the Configure Automatic Updates policy is disabled, this policy has no effect.

To inhibit auto-restart for scheduled Automatic Update installation options

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click No auto-restart for scheduled Automatic Update installation options, and set the option.

Click OK.

Automatic Update Detection Frequency

This policy specifies the hours that Windows will use to determine how long to wait before checking for available updates. The exact wait time is determined by using the hours specified here, minus 0 to 20 percent of the hours specified. For example, if this policy is used to specify a 20-hour detection frequency, then all WSUS clients to which this policy is applied will check for updates anywhere between 16 and 20 hours.

If the status is set to Enabled, Automatic Updates will check for available updates at the specified interval.

If the status is set to Disabled or Not Configured, Automatic Updates will check for available updates at the default interval of 22 hours.

To set Automatic Update detection frequency

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Automatic Update detection frequency, and set the option.

Click OK.

Allow Automatic Update Immediate Installation

This policy specifies whether Automatic Updates should automatically install certain updates that neither interrupt Windows services nor restart Windows.

If the status is set to Enabled, Automatic Updates will immediately install these updates after they have been downloaded and are ready to install.

If the status is set to Disabled, such updates will not be installed immediately.

To allow Automatic Update immediate installation

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Allow Automatic Update immediate installation, and set the option.

Click OK.

Delay Restart for Scheduled Installations

This policy specifies the amount of time for Automatic Updates to wait before proceeding with a scheduled restart.

If the status is set to Enabled, a scheduled restart will occur the specified number of minutes after the installation is finished.

If the status is set to Disabled or Not Configured, the default wait time is five minutes.

To delay restart for scheduled installations

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Delay restart for scheduled installations, and set the option.

Click OK.

Re-prompt for Restart with Scheduled Installations

This policy specifies the amount of time for Automatic Updates to wait before prompting the user again for a scheduled restart.

If the status is set to Enabled, a scheduled restart will occur the specified number of minutes after the previous prompt for restart was postponed.

If the status is set to Disabled or Not Configured, the default interval is 10 minutes.

To re-prompt for restart with scheduled installations

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Re-prompt for restart with scheduled installations, and set the option.

Click OK.

Allow Non-administrators to Receive Update Notifications

This policy specifies whether logged-on non-administrative users will receive update notifications based on the configuration settings for Automatic Updates. If Automatic Updates is configured, by policy or locally, to notify the user either before downloading or only before installation, these notifications will be offered to any non-administrator who logs onto the computer.

If the status is set to Enabled, Automatic Updates will include non-administrators when determining which logged-on user should receive notification.

If the status is set to Disabled or Not Configured, Automatic Updates will notify only logged-on administrators.

To allow non-administrators to receive update notifications

In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.

In the details pane, click Allow non-administrators to receive update notifications, and set the option.

Click OK.

This policy setting does not allow non-administrative Terminal Services users to restart the remote computer where they are logged in. This is because, by default, non-administrative Terminal Services users do not have computer restart privileges.

If this setting is enabled, Automatic Updates receives updates from the WSUS server. Users who have this policy set cannot get updates from a Windows Update Web site that you have not approved. If this policy is not enabled, the Windows Update icon remains on the Start menu for local administrators to visit the Windows Update Web site. Local administrative users can use it to install unapproved software from the public Windows Update Web site. This happens even if you have specified that Automatic Updates must get approved updates from your WSUS server.

To remove links and access to Windows Update

In Group Policy Object Editor, expand User Configuration, expand Administrative Templates, and then click Start Menu and Taskbar.

In the details pane, click Remove links and access to Windows Update, and set the option.

Оцените статью