- Установка фона (обоев) рабочего стола через групповые политики
- Настройка групповых политик управления фоном рабочего стола
- Настройка фона рабочего стола через реестр и GPO
- На Windows 10 не применяются обои рабочего стола через GPO
- How to Configure a Slideshow Screensaver Using GPO
- Network Share with Images for Slideshow and
- Configuring Scheduled Task Item using Group Policy
- Configuring Screensaver Settings on a Reference PC
- GPO to Manage Screensaver
Установка фона (обоев) рабочего стола через групповые политики
Рассмотрим, как с помощью групповых политик можно установить одинаковый рисунок рабочего стола (обои) на всех компьютерах домена. Как правило, такое требование возникает в крупных организациях, требующих использовать на всех компьютерах одинаковый фон рабочего стола, выполненного в корпоративном стиле компании.
Нам понадобится, собственно файл с рисунком, который вы хотите использовать в качестве обоев. Это может быть файл формата bmp или jpg.
Файл с изображением можно предварительно скопировать на все компьютеры, но на мой взгляд проще, чтобы клиенты автоматически брали jpg файл из сетевого каталога. Для этого можно использовать файл-сервер, каталог SYSVOL на контроллерах домена или DFS каталог. Для нашей распределенной сети мы выбрали второй вариант, ведь так как содержимое SYSVOL автоматически реплицируется между всеми DC, это уменьшит WAN — трафик между филиалами при получении клиентами файла с рисунком.
Скопируйте файл с изображением на любом контроллер домена в каталог C:\Windows\SYSVOL\sysvol\winitpro.loc\scripts\Screen. UNC путь к файлу будет выглядеть так: \\winitpro.loc\SYSVOL\winitpro.loc\scripts\Screen\corp_wallpaper.jpg.
Проверьте, что у пользователей домена есть права на чтение этого файла (проверьте NTFS разрешения, предоставив право Read группе Domain Users или Authenticated Users).
Настройка групповых политик управления фоном рабочего стола
Затем откройте консоль управления доменными GPO (GPMC.msc). Создайте новую политику и назначьте ее на нужный OU с пользователями (в нашем примере мы хотим, чтобы политика применялась на все компьютеры и сервера домена, поэтому мы просто отредактируем политику Default Domain Policy). Перейдите в режим редактирования политики.
Перейдите в секцию секции User Configuration -> Policies -> Administrative Templates -> Desktop -> Desktop (Конфигурация пользователя -> Административные шаблоны -> Рабочий стол -> Рабочий стол).
Включите политику Enable Active Desktop (Включить Active Desktop).
Затем включите политику Desktop Wallpaper (Фоновые рисунки рабочего стола). В параметрах политики укажите UNC путь к файлу с рисунком и выберите стиль фонового рисунка (Wallpaper Style) — Fill (Заполнение).
Чтобы проверить работу политики на клиенте, выполните выход из системы (logoff) и зайдите в систему опять. На рабочем столе пользователя должны отобразиться заданные обои.
Если требуется запретить пользователям менять фоновый рисунок рабочего стола, включите политику Prevent Changing Desktop Background (Запрет изменения фона рабочего стола) в разделе User Configuration -> Administrative Templates -> Control Panel -> Personalization.
Если вы хотите более точно нацеливать политику с обоями на клиентов, вы можете использовать WMI Фильтры GPO, например, чтобы применить обои только к десктопам с Windows 10, используйте следующий WMI фильтр:
select * from Win32_OperatingSystem where Version like “10.%”
Настройка фона рабочего стола через реестр и GPO
Вы можете задать параметры и файл фонового рисунка рабочего стола через реестра. Путь к файлу обоев хранится в строковом (REG_SZ) параметре реестра Wallpaper в ветке HKEY_CURRENT_USER\Control Panel\Desktop\ или HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System. В этом параметре нужно указать UNC путь к вашей картинке.
В этой же ветке реестра параметром WallpaperStyle (REG_SZ) задается положение изображения на рабочем столе. Для растягивания изображения используется значение 2.
Если вы хотите запретить пользователям менять фон рабочего стола, создайте в ветке реестра HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop параметр «NoChangingWallPaper»=dword:00000001
Эти настройки реестра можно распространить на компьютеры пользователей через расширение GPO – Group Policy Preferences. Для этого перейдите в раздел User Configuration -> Preferences -> Windows Settings и создайте два параметра реестра с режимом Update.
С помощью Group Policy Preferences Item level Targeting вы можете более точно назначить политику обоев на клиентов. Например, в свойствах параметра реестра в политике на вкладке Common включите Item level Targeting, нажмите кнопку Targeting и с помощью простого мастера укажите, что данные настройки политики фонового рисунка должны применяться только к компьютерам с Windows 10 и пользователям из определённой группы безопасности AD.
Аналогичным образом вы можете сделать несколько разных файлов обоев для разных групп пользователей (или устройств). Добавив нужных пользователей в группы доступа вы можете задать различный фоновый рисунок рабочего стола для разных категорий сотрудников.
Дополнительно вы можете изменить картинку на экране входа в систему. Для этого можно использовать политику Force a specific default lock screen image в разделе GPO Computer Configuration -> Policies -> Administrative Templates -> Control Panel -> Personalization или через следующие параметры реестра:
- HKLM\Software\Policies\Microsoft\Windows\Personalization — LockScreenImage — путь к jpg изображению на экране блокировки;
- HKLM\Software\Policies\Microsoft\Windows\Personalization — LockScreenOverlaysDisabled = 1;
- HKLM\Software\Policies\Microsoft\Windows\System — DisableLogonBackgroundImage = 0.
На Windows 10 не применяются обои рабочего стола через GPO
На компьютерах с Windows 10 политика обоев рабочего стола может применяться не с первого раза. Дело в том, что Windows 7 и Windows 10 по-разному используют кеш фонового рисунка рабочего стола. В Windows 7 при каждом входе пользователя в систему кэш фонового изображения обоев перегенеририуется автоматически.
В Windows 10, если путь к картинке не изменился, не происходит обновление кэша, соответственно пользователь будет видеть старую картинку, даже если вы обновили ее в каталоге на сервере.
Поэтому для Windows 10 можно добавить дополнительный логоф скрипт, который очищает кэш изображения при выходе пользователя из системы. Это может быть bat файл Clear_wallpaper_cache.bat с кодом:
del /F /S /Q %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper
del /F /S /Q %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Themes\CachedFiles\*.*
В результате фон рабочего стола у пользователей Windows 10 станет применяться нормально.
How to Configure a Slideshow Screensaver Using GPO
My management decided to set the same slideshow screensaver on all PCs in the company. The images of the slideshow should have corporate design and provide general rules of information security, useful tips or some other reference information. First of all, they considered the development of their own screensaver in *.scr format, but this method required some extra software and was not flexible and easy enough to manage it. It resulted in a solution to distribute images and to manage the screensaver on an Active Directory domain using GPO.
It should be mentioned right away that the company is using all supported Windows versions: Windows 7, Windows 8.1 and Windows 10 as client OSs so the solution has to be universal and work on any OS version.
In OS Windows, starting from Windows 7, you can display a slideshow of the images from the specified folder, but you cannot manage these settings using GPO. So we needed a workaround solution.
Network Share with Images for Slideshow and
First of all, create a network share to store the source images for your slideshow on any server in your network. Grant all domain users (Domain Users group) the privileges to read files in this folder. For example, in our case the UNC path to the files is \\srv1\Install\Img. Copy the images here.
Configuring Scheduled Task Item using Group Policy
Then create a script file copy_screens.bat, which will connect clients to this network share and copy the screensaver images to C:\Screen folder on the local disk of each computer. The code of the script copy_screens.bat is shown below.
net use s: \\fsrv1\Install\Img
mkdir C:\Screen
del /Q C:\Screen\*.*
xcopy S:\*.* C:\Screen
Copy this script to SYSVOL folder on the domain controller (C:\Windows\SYSVOL\sysvol\contoso.com\scripts). Then using the Group Policy Editor, create a new policy or edit an existing one. To demonstrate, we’ll run the copy task using a one-time Task Scheduler job (if you need to refresh slides, run this task again). Create a new task for the Task Scheduler for all PCs using GPO.
Go to User Configuration > Preferences > Control Panel Settings > Scheduled Tasks and create a new task (New->Scheduled Task at Least Windows 7) with the following parameters:
Task Name: CopyScreen
Action: Update
Run the task using the following account: %LogonDomain%\%LogonUser%
Add a new trigger: New Trigger -> On a Schedule -> One Time in the Triggers tab
In the Action tab, specify that the following script has to be run: \\contoso.com\SYSVOL\contoso.com\scripts\copy_screens.bat
Save the changes in the task and assign the policy to the OU with the users.
Configuring Screensaver Settings on a Reference PC
Now you need to configure your screensaver on a reference computer so that it took the images for the slide show from C:\Screen. The settings of the corresponding registry keys on this computer will be distributed to all PCs using Group Policy.
In Windows 10, go to the following settings section: Start -> Settings -> Personalization -> Lock Screen. Scroll down to find Screen Saver Settings. Select ‘Photos’ as a screensaver and click Settings.
Specify the path to C:\Screen, tick Shuffle Pictures and save the changes.
Now export the following registry branch HKEY_CURRENT_USER\Software \Microsoft\Windows Photo Viewer\Slideshow\Screensaver in a .reg file and import it on the domain controller (or another computer, on which you edit the GPO).
Save the .reg file and import it to the computer, on which you edit the GPO.
GPO to Manage Screensaver
Open your policy and go to the following GPP branch: User Configuration -> Preferences -> Windows Settings -> Registry. Create a new parameter: New > Registry Wizard > Next
Go to HKEY_CURRENT_USER -> Software -> Microsoft -> Windows Photo Viewer -> Slideshow -> Screensaver. Check the following keys and click Finish:
Then go to the following GPO section: User Configuration -> Policies -> Administrative Templates -> Control Panel -> Personalization. Enable Force specific screen saver, and specify PhotoScreensaver.scr as its value. (By default, Photoscreensaver.scr uses the folder C:\Users\Public\Pictures\Sample Pictures as the source of the screensaver images.)
- Enable Screen Saver
- Password Protect Screen – protects the Lock Screen with a password
- ScreenSavertimeout – the timeout in seconds that triggers the automatic start of the screensaver
That’s all, close Group Policy Management console and update the policies on the clients ( gpupdate /force ). A single corporate slideshow screensaver that takes images from c:\Screen will start on all domain computers after a specific timeout.