Adding a security group to AD user account using PowerShell

I am trying to build a PowerShell command that it will add a security group (not on Member Of) with full control permissions in AD user in order avoid doing it manually by hand. Is it possible ?

This is an example.


Solution 1:

Eventually, I figured out the command using dsacls:


dsacls "CN=UserCN,OU=UserOU,OU=UserOU,DC=domain,DC=domain,DC=domain" /I:T /g "\MSOL_code:GA"