- Setting the Desktop Wallpaper Background with Group Policy
- The Default Logon ScreenSaver – Distributed Announcements
- Setting the Default Logon Background with Bing Images and Group Policy
The coolest thing about Bing isn’t the search or OS integration. It is the gorgeous search backgrounds they have. Did you know that you can take that Bing background and have it replace the default Windows Logon background?
In this guide, we are going to use PowerShell and Group Policy to automatically download the Bing picture of the day and deploy it to our computers! Everyday, the logon background will update and will look like the screenshot below.
Using PowerShell to Download the Bing Background
This script connects to a Bing Images RSS feed, downloads the first picture and saves it to a network location. You will need to change line 6 to your network share. Ensure that the network folder exists and that domain computers have Read/Execute to it. The downloaded image will need to be named backgroundDefault.jpg.
$url = “http://feeds.feedburner.com/bingimages” $wc = New-Object net.webclient $xml = [ xml ]$wc.DownloadString($url) $xmlrss = $xml.rss.channel.item | Select-Object –first 1 $imgurl = $xmlrss.selectSingleNode(‘enclosure’).getAttribute(‘url’) $savelocation = ‘\\dc\Background\Bing\backgroundDefault.jpg’ $wc.DownloadFile($imgurl,$savelocation);
Use a scheduled task to set this script to run daily at 5:30 AM local time. The command in your task will be powershell.exe and the parameters will be -noprofile “C:\Scripts\Bingbackground.ps1″ . Thank you to Girish for writing this script!
Setting the Logon Background with Group Policy
In the Group Policy Management Console, create a new GPO named Bing Backgrounds. Under Computer Configuration/Preferences/Windows Settings/Files, create a new file preference and set the action to create. For the source, specify your save location from above (ex: \\SERVER\SHARE\Bing\backgroundDefault.jpg). For the destination, enter C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg .
Under the Common tab, check Apply Once and Do Not Reapply. Copy this file preference and then paste it to create a duplicate. Change the action to Replace and uncheck Apply Once and Do not Reapply. Select Item Level Targeting and add a time value target. In our environment, I only allow the picture to copy down from 5:00 AM to 9:00 AM. This prevents some network bloat. You should now have two file preferences listed.
Create a new Registry Preference under Computer Configuration. Leave the preference action at update. Enter in the following:
- Key Path: Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background
- Value Name: OEMBackground
- Value Type: REG_DWORD
- Value Data: 00000001
Under the Common tab, add a new Item Level Target that applies this registry change to just your Windows 7 machines. Now navigate to Computer Configuration/Policies/Administrative Templates/Control Panel/Personalization. Enable Force a specific default lock screen image and enter C:\windows\System32\oobe\info\backgrounds\backgroundDefault.jpg as the lock screen path. This will allow your Windows 8+ machines to have the Bing background!
Link your GPO to an OU containing computers. On the next GPUpdate, your computers will set the background registry key and copy down the Bing background. On the next reboot (or logoff), the default logon background will be set to the Bing background of the day! Next project – setting the logon screensaver for distributed announcements.