How to set 'Manager can update membership list' using QAD

Here is the script I'm using:

Import-module ActiveDirectory

set-executionpolicy remotesigned

Add-PSSnapin Quest.ActiveRoles.ADManagement

Add-QADPermission 'name of group' -Account "Users distinguishedName" -Rights WriteProperty -ApplyTo ThisObjectOnly

 

Script returns the following error:

Add-QADPermission : Access is denied.
At S:\Test\QAD-setManagedBy.ps1:6 char:1
+ Add-QADPermission 'G-MVIT-E-HTAnsosALL' -Account "CN=Endres\,
Douglas,OU=Users,O ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : NotSpecified: (:) [Add-QADPermission], Unauthori
   zedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Quest.ActiveR
   oles.ArsPowerShellSnapIn.Commands.AddPermissionCmdlet

 

Thanks in Advance