Обновить групповые политики windows 10

Чтобы на компьютере Windows применились новые настройки локальной или доменной групповой политики (GPO), служба Group Policy Client (
gpsvc
) должна перечитать настройки политик и применить изменения. Настройки групповых политик в Windows обновляются при загрузке компьютера, при входе пользователя, и автоматически в фоновом режиме (в течении от 90 до 120 минут). В некоторых случаях администратору нужно, чтобы новые настройки политики применились немедленно, не дожидаясь указанных выше событий.

Содержание:

  • Автоматическое применение настроек групповых политик в Windows
  • Принудительное обновление групповых политик на компьютере Windows
  • Обновить групповые политики на удаленных компьютерах

Автоматическое применение настроек групповых политик в Windows

Выше мы указали, когда настройки GPO автоматически применяются на клиенте:

  • Настройки групповых политик, заданные в разделе секции Computer Configuration применяются при загрузке Windows.
  • Настройки GPO из секции User Configuration применяются при входе пользователя.
  • Фоновое обновление групповых политик выполняется автоматическая раз в 90 минут + случайное смещение времени (offset) в интервале от 0 до 30 минут (рандомный интервал позволяет уменьшить нагрузку на DC одновременным запросами от клиентов). Это означает, что новые политики гарантировано применятся на клиентах в интервале 90 – 120 минут после обновления файлов GPO на контроллере домена.

    Контроллеры домена по умолчанию обновляют настройки GPO раз в 5 минут.

Настройки фонового обновления политик можно изменить с помощью параметра следующих параметров GPO в разделе Computer Configuration -> Administrative Templates -> System -> Group Policy:

  • Set Group Policy refresh interval for computers — здесь можно изменить частоту обновления настроек GPO со стандартных 90 минут и значение смещения.
  • Turn off background refresh of group policy — позволяет полностью отключить фоновое обновление настроек политик

Но в большинстве случаев трогать эти настройки не рекомендуется.

настроить частуту автоматического обновления GPO в Windows

Принудительное обновление групповых политик на компьютере Windows

Для принудительного, немедленного обновления (применения) настроек групповых политик на компьютере Windows используется утилита gpupdate.

Большинство администраторов не задумываясь используют для обновления политик команду:
gpupdate /force
.
Эта команда заставляет компьютер принудительно перечитать все политики с контроллера домена и заново применить все параметры. Т.е. ключ force указывает клиенту что нужно обратиться к контроллеру домена и заново получает файлы ВСЕХ нацеленных на него GPO. Это вызывает повышенную нагрузку на сеть и контроллер домена.

Простая команда
gpudate
без параметров применяет только новые/измененные параметры GPO.

Updating policy...
Computer Policy update has completed successfully.
User Policy update has completed successfully.

gpupdate - команда обновления параметров групповых политик

Можно отдельно обновить параметры GPO из пользовательской секции

gpupdate /target:user

или только политики компьютера:

gpupdate /target:computer /force

Если некоторые политики нельзя обновить в фоновом режиме (обычно это клиентские расширения GPO, которые обрабатываются при входе пользователя), gpudate может заверишь сеанс текущего пользователя (logoff):

gpupdate /target:user /logoff

Или выполнить перезагрузку компьютера (некоторые политики, такие как установка программ в GPO, или логон скрипты применяются только при загрузке Windows):

gpupdate /Boot

Обновить групповые политики на удаленных компьютерах

Есть несколько способов для принудительного обновления настроек GPO на удаленных компьютерах Windows.

В самом простом случае вы просто можете выполнить команду gpupdate на удаленном компьютере:

  • спомощьюутилиты PSexec:
    PsExec \\PC1 gpupdate
  • через PowerShell Remoting (WinRM):
    Invoke-Command -computername PC1 -Scriptblock {gpupdate /force}

Если нужно массово обновить групповые политики на множестве компьютеров, воспользуйтесь консолью Group Policy Management Console (
GPMC.msc
).

В Windows 10 и 11 для использования консоли придется установить компонент RSAT:

Add-WindowsCapability -Online -Name Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0

Чтобы обновить политики на компьютерах, щёлкните в консоли GPMC по нужному Organizational Unit (OU) и выберите Group Policy Update.

удаленное обновление групповых политик из консоли GPMC

Консоль поочерёдно подключится к каждому компьютеру в OU, и вы получите результат со статусом обновления политик (Succeeded/Failed).

отчет по обновлению GPO на компьютерах домена

Утилита создает на компьютерах задание планировщика с командой
GPUpdate.exe /force
для каждого залогиненого пользователя. Задание запускается через случайный промежуток времени (до 10 минут) для уменьшения нагрузки на сеть.

На клиентах в файерволе Windows Defender должны быть разрешены следующие правила:

  • Remote Scheduled Tasks Management (RPC)
  • Remote Scheduled Tasks Management (RPC-ERMAP)
  • Windows Management Instrumentation (WMI-IN)

Если компьютер выключен, или доступ к нему блокируется файерволом, для него вернется ошибка ‘The remote procedure call was cancelled‘.

Также для удаленного обновления политики можно использовать PowerShell командлет Invoke-GPUpdate, который входит в модуль управления GPO. Например, для обновления политик пользователя на удаленном компьютере, выполните:

Invoke-GPUpdate -Computer PC01 -Target "User"

Вы можете задать случайную задержку обновления GPO с помощью параметра RandomDelayInMinutes. Таким образом вы можете уменьшить нагрузку на сеть, если одновременно обновляете политики на множестве компьютеров. Для немедленного применения политик используется параметр
-RandomDelayInMinutes 0
.

В сочетании с командлетом Get-ADComputer вы можете принудительно обновить настройки групповых политик на всех компьютерах (исключая неактивные) в определенном OU:

Get-ADComputer –filter {enabled -eq "true"} -Searchbase "ou=Computes,OU=SPB,dc=winitpro,dc=com" | foreach{ Invoke-GPUpdate –computer $_.name –RandomDelayInMinutes 10 -force}

При удаленном выполнении командлета Invoke-GPUpdate или обновления GPO через консоль GPMC на мониторе пользователя может на короткое время появиться черное окно консоли с запущенной командой
gpupdate
.

In Windows 10 Group Policy is a feature that controls the working environment of user accounts and computer accounts. Group Policy provides centralized management and configuration of the operating system, user’s settings, applications, in an Active Directory environment. A set or collection of Group Policies is called Group Policy Object. A Version of Group Policy is called as a Local Group Policy (LGPO). Local GPO allows managing Group Policy without Active Directory on Standalone Computers. We all know group policies are used to control what users can and cannot do on a computer system.  For example, a Group Policy can be used to enforce a password complexity policy that prevents users from choosing an overly simple password. Other examples include allowing or preventing unidentified users from remote computers to connect to a network share or to block/restrict access to certain folders. Each time you set or configure a policy you need to update the Group Policy. This article will guide you to Update Group Policy in Windows 10.

In Windows, if you want to Update Group Policy then you have to use the Windows built-in command-line tool called GPUPDATE.exe. Gpupdate command refreshes a computer Local Group Policy and any Active Directory-based Group Polices. This command is available in almost all the versions of Microsoft Operating Systems.

Syntax of Gpupdate command:

Description:  Updates multiple Group Policy settings.

Syntax:  Gpupdate [/Target:{Computer | User}] [/Force] [/Wait:]     [/Logoff] [/Boot] [/Sync]

Parameters:

/Target:{Computer | User} Specifies that only user or only computer policy settings be refreshed. By default, both user and computer policy settings are refreshed.
/Force Reapplies all policy settings. By default, only policy settings that have changed are applied.
/Wait:{value} Sets the number of seconds to wait for policy processing to finish. The default is 600 seconds. The value ‘0’ means not to wait. The value ‘-1’ means to wait indefinitely. When the time limit is exceeded, the command prompt returns, but policy processing continues.
/Logoff Causes a logoff after the Group Policy settings are refreshed, which is required for those client-side extensions that don’t process policy on a background refresh cycle but do during log on. Examples include user-targeted Software Installation and Folder Redirection. This option has no effect if there are no extensions called that require a logoff.
/Boot Causes a reboot after the Group Policy settings are refreshed, for those client-side extensions that don’t process policy on a background refresh cycle but do at startup. Examples include computer-targeted Software Installation. This option has no effect if there are no extensions called that require a reboot.
/Sync Causes the next foreground policy application to be done synchronously. Foreground policy applications occur at computer boot and user login. You can specify this for the user, computer or both using the /Target parameter. The /Force and /Wait parameters are ignored if specified.

How to Update Local Group Policy?

Open Command Prompt in elevated mode and type the following commands.

Gpupdate

This command will force update only the changed policies.

Update Group Policy

Gpupdate /force This command will force an update or refresh all policies.

gpupdate force

After the Policy update, you will get the successful message. The computer Policy update has completed successfully. The user Policy update has completed successfully. 

Post Views: 2,454

После изменения любых настроек групповых политик с помощью локального редактора GPO (gpedit.msc) или доменного редактора политик (gpmc.msc), новые настройки политик применяются к пользователю (или компьютеру) не сразу. Вы можете дождаться автоматического обновления политик (придётся ждать до 90 минут), либо можете обновить и применить политики вручную с помощью команды GPUpdate. Команда GPUpdate используется для принудительного обновления групповых политик компьютера и/или пользователя.

Совет. В Windows 2000 для ручного обновления групповых политик использовалась команда secedit /refreshpolicy. В следующих версиях Windows она была заменена утилитой GPUpdate.

Полный синтаксис команда gpupdate выглядит так:

Gpupdate [/Target:{Computer | User}] [/Force] [/Wait:<value>] [/Logoff] [/Boot] [/Sync]

параметры утилиты gpupdate

При запуске команды gpupdate без параметров выполняется обновление только новыех и изменённых настроек политик пользователя и компьютера

gpupdate - обновить настройки групповых политик на клиенте

Updating policy…
Computer Policy update has completed successfully.
User Policy update has completed successfully.

Вы можете обновить только политики пользователя или только политики компьютера с помощью параметра /target. Например:

Gpudate /target:user

или

Gpupdate /target:computer

Для принудительного обновления настроек групповых политик используется команда GPUpdate /force. В чем разница между GPUpdate и GPUpdate /force?

Команда gpupdate применяет только измененные политики, а команда GPUpdate /force заново переприменяет все политики клиента — и новые и старые (вне зависимости от того, были ли они изменены).

В большинстве случаев для обновления политик на компьютере нужно использовать gpupdate. В больших доменах Active Directory частое использование ключа /force при обновлении GPO вызывает большую нагрузку на контроллеры домена (т.к. компьютеры запрашивают заново все нацеленные на них или на пользователей политики).

Как мы уже говорили ранее групповые политики обновляются автоматически каждые 90 минут или во время загрузки компьютера. Поэтому в большинстве случае использование опции gpupdate /force не оправдано (особенно в различных скриптах) из-за высокой нагрузки на клиентские компьютеры, контроллеры домена и каналы передачи данных. Не стоит часто использовать параметр /force для принудительного обновления натсроек политик у клиентов, подключенных по медленным и нестабильным каналам передачи.

Вы можете добавить задержку (до 600 секунд) при обновлении политик с помощью параметра /wait:

Gpupdate /wait:30

Т.к. некоторые политики пользователя нельзя обновить в фоновом режиме, а только при входе пользователя в систему (установка программ, перенаправление папок и т.д.), вы можете выполнить logoff для текущего пользователя командой:

gpupdate /logoff
Некоторые настройки политик компьютера могут применится только при загрузке Windows, поэтому вы можете инициировать перезагрузку компьютера с помощью параметра /Boot:

gpupdate /Boot
Параметр /Sync указывает, что следующее применение политики должно выполняться синхронно. Активные применения политики происходят при перезагрузке компьютера или при входе пользователя в систему.

В PowerShell 3.0 был добавлен командлет Invoke-GPUpdate, который можно использовать для обновления политик на удаленных компьютерах. Например, следующая команда запустит удаленное обновление групповых политик на компьютере msk-PC-1-22:

Invoke-GPUpdate -Computer msk-PC-1-22 -Force

Вы можете удаленно запустить принудительное обновление политик на всех компьютерах в указанном OU Active Directory с помощью команд:

$Comps = Get-AdComputer -SearchBase "OU=Computers,OU=MSK,DC=vmblog,DC=ru" -Filter *
Foreach ($Comp in $Comps) {invoke-gpupdate -Computer $Comp.Name}

The command gpupdate /force is used to force the update of group policies that are applied by your company. Changes made in the Group Policy are not applied immediately but after 90 mins by default (with a ~30 min offset to spread the load). By using the GPUpdate command we can force the update.

Group Policies are used to change security settings and for system management (like deploying printers or mapping network drives). For troubleshooting IT problems, it’s sometimes necessary to update the group policy manually.

  1. Press Windows key + X or right-click on the start menu
  2. Select Windows PowerShell or Command Prompt

  3. Type gpupdate /force and press enter

    Wait for the Computer and User policy to update

    gpupdate force

  4. Reboot your computer

    A reboot is necessary to be sure that all settings are applied.

GPUpdate vs GPUpdate Force command

The gpupdate /force command is probably the most used group policy update command. When you use the /force switch, all the policy settings are reapplied. For most use cases this is perfectly fine, but keep in mind, when you have a lot of group policies objects (GPO) or in a large environment, using the /force will put a huge load on the domain controllers.

If you have a large tenant or a lot of GPO’s, then it’s better to only run gpupdate without the /force switch to apply new policy settings. This will get only the changes or new group policies, reducing the load on the client and domain controllers.

# Reapply all policies
gpupdate /force

# Get only the changed / new group policies
gpupdate

Update only user or computer group policies

If you have a large environment or need to update the group policies on a lot of computers at the same time, then it can be useful to only update what is needed. This will reduce the load on the domain controllers and it’s of course faster.

To do this you can use the /target switch. This allows you to update only the user or computer GPO’s.

# Update only the user policies
gpupdate /target:user

# Update only the computer policies
gpupdate /target:computer

Automatically reboot or logoff after GPUpdate

Not all policy changes are applied immidiately. Due to Fast Boot, for example, are some settings only applied when the users logs in on the computer. Some settings even require a reboot to be applied.

With the use of the /logoff or /boot switch, we can let gpupdate figure out if a logoff or reboot is necessary. To be clear, if you run gpupdate /boot, then the computer will only reboot if a policy change requires it. Otherwise, the policy will be applied immediately without the reboot.

  • GPUpdate /logoff is needed for example after policy changes in the Active Directory like folder redirections or printers. Changes in the AD are only applied when the user logs in on the computer.
  • GPUpdate /boot is for example needed when you create Software Distribution changes.

Run GPUpdate on a Remote Computer

Sometimes you may need to update quickly the group policies on multiple computers because you changed the internet proxy settings or maybe to replace a printer for example. There are couple of ways to run GPUpdate on a remote computer

Using the Group Policy Management Console

You can initiate a group policy update on a whole OU with the Group Policy Management Console. It has to be an OU with only computer objects in it, so you can’t use the method on a user OU. Simply right-click on the OU where you have changed a policy and click on Group Policy Update

force group policy update

This will update the user and computer policies on all the computers in the given organization unit. The nice thing is that it will as for confirmation and show you how many computers are going to be updated.

gpupdate remote computer

After you have confirmed the update the policies will be updated and you can see the status of each computer. In this example 5 computers where turned off, so the update failed.

Use PowerShell to run GPUpdate on a Remote Computer

We can also use PowerShell to run gpupdate on remote computers. The only requirement is that you have Windows 2012 or later. Running it from Windows 10 is also possible, but then you need to open the PowerShell windows with a domain admin account.

The basis of the command is the Invoke-GPUpdate cmd. We also need to specify the computer and the RansomDelayInMinutes.

The RandomDelayInMinutes is used to lower the network load when you update a lot of computers at the same time. You can set it between 0 and 44640 minutes (31 days). Use 0 to run the update immediately.

Invoke-GPUpdate -Computer "labrat01" -RandomDelayInMinutes 0 -Force

If a user is logged on at the computer, then the Invoke-GPupdate command will ask the user for confirmation. By using the -force switch we can run the updates without the confirmation.

With this, we can create a small script to target all computers in a specific OU and run GPupdate on them.

# Spread the load by setting the delay to between 1 and 30 minutes
$random = Get-Random -Minimum 1 -Maximum 30

# Get the computers in an OU to update and run GPUpdate
Get-AdComputer -SearchBase "OU=Computers,OU=Lab,DC=lazyadmin,DC=com" -Filter * | ForEach-Object -Proces {Invoke-GPUpdate -Computer $_.Name -RandomDelayInMinutes $random -Force}

Or if you want to use a list of computers:

# Based on a list
$computers = "labpc01,labpc02,labpc03"
$computers | ForEach-Object -Proces {Invoke-GPUpdate -Computer $_ -RandomDelayInMinutes $random -Force}

Wrapping Up

I hope this article helped you with the GPUpdate /force command. If you have any questions, then just drop a comment below.

 
Way to Manually Update Group Policy on Windows 10 with steps. – On every one hour and 30 minutes, Group Policy gets updated. In addition, it takes an extra 30 minutes randomly for refreshing. It indicates that Group policy settings become up-to-date after every 2 hours interval. So, when you open the Group Policy Editor, you might not get the refresh policy settings. But if you want to view currently updated Group policy anytime there is a way.

You will see here the way for How to manually Update Group Policy In Windows 10. Security settings determine to process the policy settings after 16 hours compulsorily if it doesn’t get an update for any reason. Moreover, the policies are processed when you restart your computer. In order to launch the same with multiple procedures, follow Open Group Policy Editor in Windows 10. So when an administrator of a local computer wants the refresh policy setting he needs to wait until the processing of the same. But when you force Update the same the policy settings will be available instantly.

Manually Update Group Policy In Windows 10

Step 1 – Open Elevated Command prompt.

When you are uncertain regarding procedures then pursue – How to Launch Elevated Command Prompt on Windows 10.

Step 2 – Copy either of the commands from below, paste into the command prompt and press the Enter key on Keyboard. Either you can type one and press Enter.

gpupdate

GPUpdate.exe

GPUpdate.exe /force

You will find a message after the successful execution of the commands – Computer Policy update has completed successfully.

The gpupdate command line allows an administrator to refresh the policy settings in the background. GPUpdate.exe performs the same works for users on Windows computer. GPUpdate.exe /force works for each signed in user.through a remote scheduled task and proceed the Policy settings forcibly to the latest update.

After you run GPUpdate.exe /force, it works within 10 minutes. The command line does not perform the task instantly due to avoiding load on Network traffic.

In earlier versions of Windows, PowerShell cmdlet Invoke-GPUpdate has been helping users to Update Group Policy Editor, but this is not working on the current edition or server 2016.

To learn about the methods for accessing the same, follow How to Run PowerShell as administrator in Windows 10.

In addition, you find few more command line tools to manage your gpedit.msc. These are GPMC, GPFIXUP, GPRESULT, GPUPDATE and LDIFDE are the tools important to perform different tasks and also fix problems.

To receive the collection of policies at the same time on your computer, come after this guide Download All Group Policy Settings in Windows 10 as Spreadsheets.

Conclusion

So these are the procedures for How to Manually Update Group Policy In Windows 10. Once you refresh the Group policy you will be able to configure your essential settings in a less amount of time.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows 10 инструмент для создания образа
  • Mirror s edge не запускается на windows 10
  • Как сделать полный доступ к файлу windows 10
  • Корсары проклятие дальних морей windows 10
  • Драйвер для windows 10 zyxel nw2105 ee