0%
Guide: Modifying and Removing a GPO Link

Guide: Modifying and Removing a GPO Link

Ce guide vous explique comment modifier et supprimer le lien d’une stratégie de groupe (GPO) dans Active Directory à l’aide de PowerShell. Vous verrez ...

10-15 min

Guide: Modifying and Removing a GPO Link

This guide explains how to modify and remove a Group Policy Object (GPO) link in Active Directory using PowerShell. You will see how to enforce a GPO, disable its link, or remove the link from an OU.

Prerequisites

Make sure you have administrator rights and the necessary permissions to modify and remove GPO links in Active Directory. Run PowerShell as an administrator.

1. Enforce a GPO: Set-GPLink -Name test -Target "OU=OUTest,DC=lab,DC=lan" -Enforced Yes

Set-GPLink -Name test -Target "OU=OUTest,DC=lab,DC=lan" -Enforced Yes

This command enforces the GPO named test on the specified organizational unit (OU=OUTest,DC=lab,DC=lan). When a GPO is enforced, it takes precedence over other GPOs that may conflict with it in the Active Directory hierarchy.

  • Parameters:

    • -Name: the name of the GPO.
    • -Target: the path of the OU where the GPO is applied.
    • -Enforced: specifies that the GPO is enforced (Yes).
  • Result:

    • The test GPO is applied with priority and enforced on the target OU, overriding other policies in case of conflicts.
Link copied!