Grants a level of permissions to a security principal for one GPO or all the GPOs in a domain.
Active Directory · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft GroupPolicy reference: Grants a level of permissions to a security principal for one GPO or all the GPOs in a domain. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Set-GPPermission. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / GroupPolicy · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-All (required)
Specifies that the permission level is set for the specified security principal for all GPOs in the domain.
-Confirm
Prompts you for confirmation before running the cmdlet.
-DomainName
Specifies the domain for this cmdlet. You must specify the fully qualified domain name (FQDN) of the domain. For the Set-GPPermission cmdlet, the GPO for which to get the permission level must exist in this domain. If you do not specify the DomainName parameter, the domain of the user that is running the current session is used. If the cmdlet is being run from a computer startup or shutdown script, the domain of the computer is used. For more information, see the Notes section in the full Help. If you specify a domain that is different from the domain of the user that is running the current session (or, for a startup or shutdown script, the computer), a trust must exist between that domain and the domain of the user or the computer. You can also refer to the DomainName parameter by its built-in alias, domain. For more information, see about_Aliases.
-Guid (required)
Specifies the GPO for which to set the permission level by its globally unique identifier (GUID). The GUID uniquely identifies the GPO. You can also refer to the Guid parameter by its built-in alias, Id.
-Name (required)
Specifies the GPO for which to set the permission level by its display name. The display name is not guaranteed to be unique in the domain. If another GPO with the same display name exists in the domain, an error occurs. You can use the Guid parameter to uniquely identify a GPO. You can also refer to the Name parameter by its built-in alias, DisplayName.
-PermissionLevel (required)
Specifies the permission level to set for the security principal. The acceptable values for this parameter are: - GpoRead - GpoApply - GpoEdit - GpoEditDeleteModifySecurity - None
-Replace
Specifies that the existing permission level for the group or user is removed before the new permission level is set. If a security principal is already granted a permission level that is higher than the specified permission level and you do not use the *Replace* parameter, no change is made.
-Server
Specifies the name of the domain controller that this cmdlet contacts to complete the operation. You can specify either the fully qualified domain name (FQDN) or the host name. If you do not specify the name by using the Server parameter, the primary domain controller (PDC) emulator is contacted. You can also refer to the Server parameter by its built-in alias, DC.
-TargetName (required)
The name of the security principal for which to set the permission level. You can specify a user, a security group, or a computer. You can use either the domain-qualified name of the security principal (domain\account) or just its name. For instance, in the contoso.com domain, to specify: - The user SomeUser, use contoso\SomeUser or SomeUser. - The Domain Admins security group, use contoso\Domain Admins or Domain Admins. - The computer computer-01, use contoso\computer-01 or computer-01.
-TargetType (required)
The type of security principal for which to set the permission level. You must specify User, Group, or Computer. The acceptable values for this parameter are: - Computer - User - Group
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the GroupPolicy module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 1: Set the permission level for a security group belonging to a GPO
Set-GPPermission -Name TestGpo -TargetName "Domain Users" -TargetType Group -PermissionLevel GpoRead
This command sets the permission level for the Domain Users security group to GpoRead for the GPO named TestGpo. Because the Replace parameter is not specified, if the group already has a permission level higher than GpoRead, such as GpoEdit, no action is taken. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.