<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>background personalization Archives - Erjen Rijnders</title>
	<atom:link href="https://erjenrijnders.nl/tag/background-personalization/feed/" rel="self" type="application/rss+xml" />
	<link>https://erjenrijnders.nl/tag/background-personalization/</link>
	<description>Microsoft Azure/EMS blog</description>
	<lastBuildDate>Fri, 05 Feb 2021 09:33:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Set desktop background with Intune, but allow modification</title>
		<link>https://erjenrijnders.nl/2021/02/04/set-desktop-background-with-intune-but-allow-modification/</link>
					<comments>https://erjenrijnders.nl/2021/02/04/set-desktop-background-with-intune-but-allow-modification/#comments</comments>
		
		<dc:creator><![CDATA[Erjen]]></dc:creator>
		<pubDate>Thu, 04 Feb 2021 16:14:46 +0000</pubDate>
				<category><![CDATA[Intune]]></category>
		<category><![CDATA[Intune desktop background]]></category>
		<category><![CDATA[background personalization]]></category>
		<guid isPermaLink="false">https://erjenrijnders.nl/?p=76047</guid>

					<description><![CDATA[<p>Index 1. Set desktop background with Intune, but allow modification2. Push the desktop background from Intune &#160; Set desktop background [&#8230;]</p>
<p>The post <a href="https://erjenrijnders.nl/2021/02/04/set-desktop-background-with-intune-but-allow-modification/">Set desktop background with Intune, but allow modification</a> appeared first on <a href="https://erjenrijnders.nl">Erjen Rijnders</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>Index</strong></h2>



<p><a href="#set-desktop-bg">1. Set desktop background with Intune, but allow modification</a><br /><a href="#Push-the-desktop-background-from-Intune">2. Push the desktop background from Intune</a></p>

<p>&nbsp;</p>
<h2 id="set-desktop-bg">Set desktop background with Intune, but allow modification</h2>
<p>It&#8217;s possible to set the desktop background with Intune, very easily. The problem however is let the user changing it afterwards which is not possible. When pushing the desktop background with Intune, changing the background image is greyed out:</p>
<p>&nbsp;</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-76052" src="https://erjenrijnders.nl/wp-content/uploads/2021/02/cannot-change-bg.png" alt="background image personalization" width="398" height="456" srcset="https://erjenrijnders.nl/wp-content/uploads/2021/02/cannot-change-bg.png 497w, https://erjenrijnders.nl/wp-content/uploads/2021/02/cannot-change-bg-262x300.png 262w" sizes="(max-width: 398px) 100vw, 398px" /></p>
<p>The solution is to delete the regkey that is responsible for &#8220;locking&#8221; the background. Just remove this key, it doesn&#8217;t actually remove the background but only removes the lock. Relevant regkey: </p>
<pre class="wp-block-code">

<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP\DesktopImagePath</div></td></tr></tbody></table></div>

</pre>
<p></p>
<p>Just remove the property &#8220;DesktopImagePath&#8221; (create a back-up first of course). If you want to do this for multiple users, you can use this PowerShell script:</p>
<p>&nbsp;</p>
<p></p>
<pre class="wp-block-code">

<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">$path = &quot;HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP&quot;<br />
$PCSP = Get-ItemProperty $path -Name &quot;DesktopImagePath&quot; -ErrorAction SilentlyContinue<br />
if (!$null -eq $PCSP) {<br />
&nbsp; &nbsp; Remove-ItemProperty -Path $path -Name &quot;DesktopImagePath&quot; -Force<br />
}<br />
}<br />
if ($false -eq (Test-Path &quot;$env:ProgramData\Microsoft\AllowBackgroundPersonalization&quot;)) {<br />
&nbsp; &nbsp; $scriptfile = New-Item -ItemType Directory -Path &quot;$env:ProgramData\Microsoft\AllowBackgroundPersonalization&quot;<br />
}</div></td></tr></tbody></table></div>

</pre>
<p></p>
<p>&nbsp;</p>
<p>If you use the Intune &#8220;Scripts&#8221; option, it&#8217;s possible that the script runs earlier than the desktop background is pushed. Since the scripts runs only once, this script doesn&#8217;t have any effect. You could create a scheduled task that runs at every logon to work around the problem:</p>
<p></p>
<pre class="wp-block-code">

<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">$script = {<br />
&nbsp; &nbsp; $path = &quot;HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP&quot;<br />
$PCSP = Get-ItemProperty $path -Name &quot;DesktopImagePath&quot; -ErrorAction SilentlyContinue<br />
if (!$null -eq $PCSP) {<br />
&nbsp; &nbsp; Remove-ItemProperty -Path $path -Name &quot;DesktopImagePath&quot; -Force<br />
}<br />
}<br />
if ($false -eq (Test-Path &quot;$env:ProgramData\Microsoft\AllowBackgroundPersonalization&quot;)) {<br />
&nbsp; &nbsp; $scriptfile = New-Item -ItemType Directory -Path &quot;$env:ProgramData\Microsoft\AllowBackgroundPersonalization&quot;<br />
}<br />
$script | Out-File -FilePath &quot;$scriptfile\AllowBackgroundPersonalization.ps1&quot;<br />
<br />
$schtaskName = &quot;AllowBackgroundPersonalization&quot;<br />
$schtaskDescription = &quot;Allow changing the background in Intune&quot;<br />
$trigger = New-ScheduledTaskTrigger -AtLogOn<br />
$principal = New-ScheduledTaskPrincipal &quot;NT AUTHORITY\SYSTEM&quot; -RunLevel Highest<br />
$action = New-ScheduledTaskAction -Execute powershell.exe -Argument &quot;-File $scriptfile\AllowBackgroundPersonalization.ps1&quot;<br />
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries<br />
$null=Register-ScheduledTask -TaskName $schtaskName -Trigger $trigger -Action $action -Principal $principal -Settings $settings -Description $schtaskDescription -Force<br />
Start-ScheduledTask -TaskName $schtaskName</div></td></tr></tbody></table></div>

</pre>
<p></p>
<p>Next step is to push the script by Intune. Since the script is running in system context and getting the regkey from the local system, you can run it in system context:</p>
<p><img decoding="async" class="alignnone wp-image-76061" src="https://erjenrijnders.nl/wp-content/uploads/2021/02/run-script-intune.png" alt="intune add powershell script" width="789" height="320" srcset="https://erjenrijnders.nl/wp-content/uploads/2021/02/run-script-intune.png 1043w, https://erjenrijnders.nl/wp-content/uploads/2021/02/run-script-intune-300x122.png 300w, https://erjenrijnders.nl/wp-content/uploads/2021/02/run-script-intune-1024x415.png 1024w, https://erjenrijnders.nl/wp-content/uploads/2021/02/run-script-intune-768x311.png 768w" sizes="(max-width: 789px) 100vw, 789px" /></p>
<p>&nbsp;</p>
<h2 id="Push-the-desktop-background-from-Intune">Push the desktop background from Intune</h2>
<p>This is how you push the desktop background by Intune. Go to: <a href="https://endpoint.microsoft.com/#blade/Microsoft_Intune_DeviceSettings/DevicesMenu/configurationProfiles">https://endpoint.microsoft.com/</a> Create a new profile:</p>
<p><img decoding="async" class="alignnone wp-image-76050 size-full" src="https://erjenrijnders.nl/wp-content/uploads/2021/02/new-profile-w10-device-restrictions.png" alt="intune create profile" width="565" height="341" srcset="https://erjenrijnders.nl/wp-content/uploads/2021/02/new-profile-w10-device-restrictions.png 565w, https://erjenrijnders.nl/wp-content/uploads/2021/02/new-profile-w10-device-restrictions-300x181.png 300w" sizes="(max-width: 565px) 100vw, 565px" /></p>
<p>Fill in an internet-accessible URL:</p>
<p><img decoding="async" class="alignnone wp-image-76051" src="https://erjenrijnders.nl/wp-content/uploads/2021/02/set-bg-intune-personalization.png" alt="image personalization" width="535" height="512" srcset="https://erjenrijnders.nl/wp-content/uploads/2021/02/set-bg-intune-personalization.png 771w, https://erjenrijnders.nl/wp-content/uploads/2021/02/set-bg-intune-personalization-300x287.png 300w, https://erjenrijnders.nl/wp-content/uploads/2021/02/set-bg-intune-personalization-768x735.png 768w" sizes="(max-width: 535px) 100vw, 535px" />  </p><p>The post <a href="https://erjenrijnders.nl/2021/02/04/set-desktop-background-with-intune-but-allow-modification/">Set desktop background with Intune, but allow modification</a> appeared first on <a href="https://erjenrijnders.nl">Erjen Rijnders</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://erjenrijnders.nl/2021/02/04/set-desktop-background-with-intune-but-allow-modification/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
	</channel>
</rss>
