--- title: "Managing AD impersonation detection rules using the CLI" slug: "managing-ad-impersonation-detection-rules-using-the-cli" tags: ["Product Usage", "EX 11.x", "FX 11.x", "AX 11.x", "NX 11.x", "Network Security"] updated: 2026-08-24T19:53:02Z published: 2026-08-24T19:53:02Z canonical: "docs.trellix.com/managing-ad-impersonation-detection-rules-using-the-cli" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Managing AD impersonation detection rules using the CLI After the AD synchronization script completes its initial run, you can use the Email Security - Server appliance CLI to configure AD sender impersonation detection rules by adding AD group names. ### Prerequisites - You have administrator access to the Email Security - Server appliance. - You have the objectGUID of each AD group whose users you want to add to the impersonation rules check. - The AD synchronization script has completed its first run. See [Starting the AD synchronization script using the Web UI on](/data-and-email/docs/starting-the-ad-synchronization-script-using-the-web-ui) . ![O365AD_Group_Rules_tab.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-28fe3072-9405-a366-5bba-ed9918233486.png?sv=2026-02-06&spr=https&st=2026-11-22T14%3A09%3A00Z&se=2026-11-22T15%3A09%3A00Z&sr=c&sp=r&sig=bZ8Uo5HYFUhMUJM3uNHrgefN0A%2Bg9XlYgc7YTcUDi2o%3D) > [!NOTE] > Note > > The appliance Web UI does not display the AD synchronization progress or status. **To manage AD sender impersonation detection rules using the CLI:** 1. Log in to the Email Security - Server appliance CLI as an administrator. 2. Go to configure mode. ``` hostname > enable hostname # configure terminal ``` 3. To add all the users from an AD group to a sender impersonation detection rule, use the following command, where `<group uuid >` is the objectGUID for the AD group: `email-analysis impersonation o365 group-id <group-uuid>` 4. To show all AD sender impersonation detection rules, use the following command: `show email-analysis impersonation ad-group all` 5. To remove an AD sender impersonation detection rule, use the following command, where `<rule-id >` is the identifier for the AD impersonation rule: ``` no email-analysis impersonation o365 rule-id ``` After you remove an AD sender impersonation detection rule, the appliance no longer checks for sender impersonations of the users who were in those AD groups. 6. Save your changes. `hostname (config) # write memory`