Can we edit the sytem local group policy?

Hi Team,

I would like to set the common wallpaper for all the users. I can achieve the same by changing the Local Computer policy .

But I can’t do the same with Powershell. Couldn’t able to retrieve the local computer policies and the can not make any changes to the local computer policies.

Can someone assist me further to achieve this.

K,
Welcome to the forum. :wave:t4:

You’re right - there are no cmdlets like Set-LocalComputerPolicy or something like this. But since those settings are saved as registry settings you just have to find the according registry keys and manipulate them by PowerShell.

I’ve goolged a little bit for you and found this:

Thanks for your time. Yeah , you are absolutely right . There is no direct approach to change the local policy.

I referred the links already, those are changing at current user session (HKCU:) not for all the users.

Hence those are not satisfying my requirement.

So you set the setting for each user to the same setting and preset the same setting for the default user. No big deal. :wink:

… or you figure out where the setting for the computer policy is saved. That shouldn’t be a big deal either. :wink: :wink:

Yep, but all the ways were blocked.

There is no direct way to change the Local Computer Policy.

Have to create a GPO at domain level and apply on the individual or required systems.

But I am checking is there any way to set the local computer policy.

I wonder why you don’t do it with a GPO if you have the chance.

Depends on what you mean by “direct”. You can use “secedit.exe” for this.

Secedit.exe ? If possible Will you please explain with an example?

Thanks in advance.

It might be best to google it. Basically, you either need to create an INF template, or a security database and use secedite.exe to apply either one. Also, although you may run the command using PS, this is pretty much going to get flames for not being relevant to PowerShell and this forum.

Let me know exactly what you want to change and I will see if I can provide some guidance.

May I ask what the actual reason is for not doing it the proper way with GPOs? They are made for exactly this purpose.

To be able to do something with PowerShell does not mean it’s the best way to do it. :wink:

Thanks for the response.

As a part of decommision I would like to apply the static wallpaper for the specified machines.

If set the same with HKCU , it will apply only for the current user session.

My requirement is wallpaper should applicable for all the users.

Achieved the same with Local computer policy. But trying to do the same with powershell script.

I already recommended to set the wallpaper for the default user. This should apply for all future users of this machine. It should be at least worth trying. :wink:

And BTW:

You could have provided this info in your initial question. :smirk: