Use your RMM Solution to set corporate Background + ScreenLock

We all know how important it is to maintain a consistent corporate image and communicate information effectively within our organization. That’s why we often use solutions like Intune to set corporate wallpapers and lock screens on all our devices. However, we’re aware that not everyone has access to an Intune tenant.

Today, we’re going to explore an alternative that uses your RMM solution (Datto RMM, N-able RMM, NinjaOne RMM, Atera RMM, ConnectWise RMM…etc) to accomplish the same task. Not only does this method offer the same benefits in terms of brand consistency and information communication, it’s also accessible to those of us who don’t have access to Intune.

We hope you find this alternative solution useful, and look forward to discussing how we can implement it together.

I’ve already written an article on the same subject using Intune, you can see it here :

Intune : Set corporate background and Lockscreen for all Windows joined machines | LinkedIn

In this article, we’ll use the same steps to share the Background and Lockscreen images on an Azure storage account BLOB (I’ve already set up storage accounts if you want more details here’s the link : Create Azure Storage Account and understand the different use cases by examples | LinkedIn) then retrieve the images from an https link and apply them to any machine using PowerShell Scripts deployed with RMM Solution.

I – Prepare Wallpapers :

  • You will need two wallpapers: one for the lock screen and one for the desktop wallpaper screen.
  • Both wallpapers must be in PNG, JPG, or JPEG file/format and stored in a location that is publicly accessible, in my case I will use Azure Blob storage Account, However, you can also use other locations, such as SharePoint Online, OneDrive or Dropbox, if they provide public accessibility for the wallpapers.

1 – Upload wallpapers to Azure Blob storage Account :

After accessing your storage Account, click on the container section and create a new container (you can use an existing container).

See this article to find out how to create a container:

Create Azure Storage Account and understand the different use cases by examples | LinkedIn

I’ll then upload two JPG files, one for the Background and the other for the Lockscreen.

  1. File selection: Choose the file you wish to share.
  2. Generate SAS: Click on “Generate SAS” to start creating a SAS link.
  3. Define validity: Determine the period during which the SAS link will be valid.
  4. SAS link creation: Click on “Generate SAS token and URL” to generate the link.
  5. Share URL: Copy the generated URL for use in our Intune policy.

These steps enable you to create a SAS (Shared Access Signature) link to provide secure access to a file stored, for example, in Azure Storage. The SAS link is a convenient way of sharing files without having to give full access to your storage account.

Repeat steps 1 to 4 with the second file and copy the URL into a notepad.

II – Execute PowerShell Script from your RMM Solution :

Today, all RMM solutions support PowerShell script execution.

You can just add this script to your RMM Script Library then execute it any time you want.

All you need is to Add your Background URL in the script

$Backgroundlink = “https : // your_full_URL_Here

Remember this :

The scripts should be executed as Loged-on User and NOT as System

 # Download Directory for background image file
$DownloadDir = "C:\Background\"

# Test if directory exist, otherwise create it
if((Test-Path $DownloadDir) -eq $false)
{
    New-Item -ItemType Directory -Path $DownloadDir -erroraction SilentlyContinue | Out-Null
}

# ----------------------------------------------------- This is the link for the Background file URL
$Backgroundlink = "https://your full URL Here"

$Download = $DownloadDir + "Backgroung-01.jpg"

# Download the background
Invoke-WebRequest $Backgroundlink -OutFile $Download



Function Set-WallPaper($Image) 
{
    <#
 
        .SYNOPSIS
        Applies a specified wallpaper to the current user's desktop
    
        .PARAMETER Image
        Provide the exact path to the image
  
        .EXAMPLE
        Set-WallPaper -Image "C:\Wallpaper\Default.jpg"
  
    #>
  
Add-Type -TypeDefinition @" 
using System; 
using System.Runtime.InteropServices;
  
public class Params
{ 
    [DllImport("User32.dll",CharSet=CharSet.Unicode)] 
    public static extern int SystemParametersInfo (Int32 uAction, 
                                                   Int32 uParam, 
                                                   String lpvParam, 
                                                   Int32 fuWinIni);
}
"@ 
  
    $SPI_SETDESKWALLPAPER = 0x0014
    $UpdateIniFile = 0x01
    $SendChangeEvent = 0x02
  
    $fWinIni = $UpdateIniFile -bor $SendChangeEvent
  
    $ret = [Params]::SystemParametersInfo($SPI_SETDESKWALLPAPER, 0, $Image, $fWinIni)
 
}


Set-WallPaper -Image $Download 

Same think for Lockscreen, you need just to add your Lockscreen URL :

$Lockscreen = “https : // your_full_URL_Here

Remember this :

The scripts should be executed as Loged-on User and NOT as System

# Download Directory for Lockscreen image file
$DownloadDir = "C:\Background\"

# Test if directory exist, otherwise create it
if((Test-Path $DownloadDir) -eq $false)
{
    New-Item -ItemType Directory -Path $DownloadDir -erroraction SilentlyContinue | Out-Null
}

# ----------------------------------------------------- This is the link for the Background file URL
$Lockscreen = "https://your full URL Here"

$Download = $DownloadDir + "Lockscreen-01.jpg"

# Download the background
Invoke-WebRequest $Lockscreen -OutFile $Download


# Set Path for Lockscreen image
$LockscreenPath = "C:\Background\Lockscreen-01.jpg"

# Personalization registry Key
$Key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP'
if (!(Test-Path -Path $Key)) {
   New-Item -Path $Key -Force | Out-Null
}

# Set Lockscreen image
Set-ItemProperty -Path $Key -Name LockScreenImagePath -value $LockscreenPath 

Thanks

Aymen EL JAZIRI (Microsoft MVP)
Aymen EL JAZIRI (Microsoft MVP)

Hi, I’m Aymen El Jaziri , a passionate System Administrator and Microsoft MVP, with years of hands-on experience in managing and securing modern IT infrastructures.
This blog is where I share technical guides, automation scripts, product reviews, and real-world solutions that help IT professionals simplify their day-to-day work and stay ahead in a fast-evolving cloud ecosystem.
Whether you’re here to troubleshoot an issue, improve your automation game, or learn new best practices , welcome in my blog !
Let’s build a stronger, smarter IT community together.
Feel free to connect with me on LinkedIn for more content, discussions, or collaboration opportunities.

Thanks

Aymen

Articles: 154