In Local Group Policy Editor (GUI) there is a setting called Do not allow window animations
located in Computer Configuration
->Administrative Templates
->Windows Components
->Desktop Window Manager
that I would like to set as Enabled using the powershell, Since my windows version is professional I can added the RSAT GroupPolicy capability to my machine which I did and now I can use the Group Policy Cmdlets in Windows PowerShell
but I am clue less on how to Enable that feature using the commands
I tired to use
Get-GPO -Name "Do not allow window animations"
but this returns
Get-GPO : Current security context is not associated with an Active Directory domain or forest.
the grouppolicy module is wokring fine but I can't figure out how to query or change the value of any settings in the GPO
CodePudding user response:
If you want cmdlets in order to change values you can use the PolicyFileEditor module from the gallery https://www.powershellgallery.com/packages/PolicyFileEditor/3.0.1
CodePudding user response:
The Get-GPO function is meant exclusively for Domain Group Policies, and not Local Policies, which it seems you are referencing. The description for the module also mentions this:
Gets one GPO or all the GPOs in a domain.
In order to modify local policies, you need to make a change to the respective setting in the registry
For example to disable the Shutdown button, you would need to modify:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown
Value = 1