In this post we’ll see how we can set the Desktop Background, Lock Screen wallpaper and Screensaver.
There are two methods to set the Lock Screen and Background wallpaper. You can either use the Configuration Policy or PowerShell script. We’ll see both of them.
Assumption: you have already copied the files to Windows folder using previous post.
Existing setup done:
- Two Local users created
- Azure AD Connect configured
- Seamless Single Sign-On (IE) configured
- Seamless Single Sign-On (Firefox) configured
- Hybrid Azure AD Join configured
- Intune enrollment – Domain Joined Windows 10 devices
- Azure AD Join
- Office 365 Pro Plus Application
- Sample SharePoint Team Site
- OneDrive Known Folder Migration and SharePoint library sync
- Copy necessary files (Win32 App)
Existing setup:
- SkyDC: Machine with ADDS, DNS, DHCP role
- SkyCON: Machine where we will install Azure AD Connect
- SkyCM: Machine with Configuration Manager Current Branch
- SkyTEN1: Domain Joined Windows 10 machine
- SkyTEN2: Domain Joined Windows 10 machine
- SkyTEN3i: Domain Joined Windows 10 machine (Intune Managed)
- SkyTEN4i: Domain Joined Windows 10 machine (Intune Managed)
- SkyTEN5i: Azure AD Joined Windows 10 (Intune Managed)
- SkyTEN6i: Azure AD Joined Windows 10 (Intune Managed)
- SkyTEN7i: Azure AD Joined Windows 10 (Cloud User, Intune Managed)
- SkyTEN8i: Azure AD Joined Windows 10 (Cloud User, Intune Managed)
Set Lock Screen wallpaper (Method 1)
Login to Azure portal.
Navigate to Intune -> Device configuration -> Profiles. Click +Create profile.
Enter Name. I have entered Win10 Set Lockscreen Wallpaper.
Enter Description. I have not entered anything.
In Platform, select Windows 10 and later.
In Profile type, select Device restrictions.
Click on Settings – Configure.
Navigate to Settings – Configure -> Locked Screen Experience -> and in Locked screen picture URL (Desktop only) enter the wallpaper in format: file:///c:/windows/Sky366LS.png
Click OK.
Click OK.
Click Create.
Navigate to Assignments.
Choose the appropriate option. If you select Selected Groups, you need to select the appropriate group.
I have selected All Devices.
Click Save after you have selected the appropriate option.
Set Desktop Background wallpaper (Method 2)
$wallpaperSourceFile = “${Env:SystemRoot}\Sky366BG.png”
Remove-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name “Wallpaper”
New-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name Wallpaper -Value $wallpaperSourceFile -PropertyType String
rundll32.exe user32.dll, UpdatePerUserSystemParameters, 0, $false
Create a PowerShell Script with above Text.
Navigate to Intune -> Device configuration -> PowerShell scripts. Click on +Add.
In Name, provide name of the script. I have given Set Desktop Background. Click Next.
Click on the folder icon to browse for the script.
Select the SetWallpaper.ps1 script.
In Run this script using the logged on credentials, select Yes.
Click Next.
In Assignments, select the appropriate option. If you want to deploy it to a group, click on +Select groups to include and select the appropriate group.
I have selected All devices.
Click Next.
Click Add.
You can see that the script is added and deployed.
Set Screen Saver
$screensaverSourceFile = “${Env:SystemRoot}\Sky366.scr”
Remove-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name “ScreenSaveActive”
Remove-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name “ScreenSaverIsSecure”
Remove-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name “ScreenSaveTimeOut”
Remove-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name “SCRNSAVE.EXE”
New-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name ScreenSaveActive -Value 1 -PropertyType String
New-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name ScreenSaverIsSecure -Value 0 -PropertyType String
New-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name ScreenSaveTimeOut -Value 60 -PropertyType String
New-ItemProperty -Path “HKCU:\Control Panel\Desktop” -Name SCRNSAVE.EXE -Value $screensaverSourceFile -PropertyType String
Create a PowerShell Script with above Text.
Follow above method to add the PowerShell Script in Intune.
Make sure that you run the script using logged on user’s credentials.
Deploy it to appropriate group
You can see that the script is added and deployed.
In Client machine:
Sync the device
Log off once
Locked screen picture.
Desktop background
Screen Saver
Avaron
Device n Cloud
Avaron
Device n Cloud
Avaron
Device n Cloud
Nicolai
Jim
Jose
Ben
Device n Cloud