Forum Discussion
Can we Edit the Local Computer Policy ?
somnio0505
Thanks for your response. There is no GPO for the desktop wallpaper.
Set-ItemProperty : with this I can only able to change the current user session only. Not for every user.
I believe LGPO is the only option.
Do we have any powershell cmdlet to use this LGPO ?
If you want to chagne all local user's desktop wallpaper, you should change "HKEY_USERS" registry value not a HKEY_CURRENT_USER.
You can change other user's value HKLM > HKU\SID(S-1-xxxx)
But it's temporarily too.
LGPO is standalone. You just type LGPO commands in script.
# Export (Backup)
# You shoud using path all user can access.
"PATH"\LGPO.exe /b "PATH"\"BACKUP"
# Adjust
"PATH"\LGPO.exe /g "PATH"\"BACKUP"
There are several things to watch out before you try this.
* Other local policies are being used individually
* How to execute LGPO to all users.
The question arises as I write this, why was the group policy excluded?
- Vinay335Dec 29, 2021Copper ContributorGroup Policy is under progress. checking for the workaround. So there is no direct approach to change the local computer policy directly / through script.
- somnio0505Dec 30, 2021Brass Contributor
Hi, Vinay335
I tested the logon script for overwrite group policy.
It works on my test environment. Please try below steps in your env.
1. Deploy your wallpaper image to user.
eg. C:\temp\wallpaper.jpg
or you can use shared folder which all user can access. \\xx.xx.xx.xx\___\wallpaper.jpg but it has a issues when using a NAC based on user acl.
2. Make simple batch to all user
#WALLPAPER.bat
@echo off
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v WallPaper /t REG_SZ /d C:\temp\wallpaper.jpg /f
3. Create Scheduled Job (taskschd.msc)
Create task
* General Tab : Type "Name" / Check 'Run with highest privileges'
* Triggers Tab : New > At log ong / Select 'Any user'
* Action Tab : New > Start a program / C:\temp\wallpaper.bat
Done.
4. Test several situations.
a. gpupdate /force
b. lock and unlock screen
c. reboot PC
d. switch user
etc.