1

I have been trying to enable or disable a Local group policy with powershell to automate the process, I tried installing Remote Server Administration Tools but it's module in powershell needs the pc to be in a domain.

Is there any way to enable\disable a Local group policy with powershell?

Sharaz
  • 23
  • 1
  • 7
  • 1
    All local group policy configurations are stored in the registry. Find the appropriate registry of the setting you want to modify and edit it in the registry. You can easily do that with powershell. – Sid Aug 10 '18 at 11:44
  • if i know the location of that specific policy how can i enable\disable it with powershell, any example? – Sharaz Aug 10 '18 at 12:59

1 Answers1

1

Use the registry (note that this requires elevation):

Set-ItemProperty -Path <HKLM:RegistryPath> -Name <PropertyToChange> -Value <NewValue>

Example (Enabling Search Suggestions from Edge):

Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\MicrosoftEdge\SearchScopes" -Name "ShowSearchSuggestionsGlobal" -Value 1