Remove-Qadgroupmember : The server is unwilling to process the request. (Exception from HRESULT: 0x80072035) RRS feed

  • Question

  • Hi everyone, I am trying to automate a script that would remove about 40-50 users from a security group.  Some users are on Domain A and Domain B, BUT the Security group sits on Domain B.  

    This is my scripts: 

    Add-PSSnapin Quest.Activeroles.ADManagement

    $users = Import-Csv C:\userlist.csv
    Foreach ($user in $users)
       Remove-Qadgroupmember -identity "Mail Signature NYC" -member $user.usernames -Confirm:$false

    my CSV looks like this:




    Any help would be greatly appreciated.  

    • Moved by Bill_Stewart Friday, March 15, 2019 12:36 AM This is not third-party support forum
    Sunday, December 2, 2018 4:06 AM

All replies

  • You will have to post Quest issues to a Quest forum.  Quest  is an obsolete product and not a Microsoft product.

    The simple issue is that you must have admin privileges on both domains to do this.  Also you cannot use a userID to add or remove members.  You must use the DistinguishedName.


    • Edited by jrv Sunday, December 2, 2018 4:14 AM
    Sunday, December 2, 2018 4:11 AM
  • What would you recommend as a better approach aside from <g class="gr_ gr_42 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation multiReplace" data-gr-id="42" id="42">quest.</g>  I am a novice when it comes to scripting so I am learning as I go. 


    Sunday, December 2, 2018 4:46 AM
  • I posted the better approach above.

    No matter what system you use you must use the Distinguished name and be an admin in both domains.  Ask your domain admins for help understanding this.  It has nothing to do with scripting.  It is just how Windows works.


    Sunday, December 2, 2018 4:55 AM
  • odd enough I did get it to work partially.  It works with Domain B users in Domain B security group but not Domain A to Domain B.  


    Sunday, December 2, 2018 4:58 AM
  • Which is what I have been telling you.  You need to learn basic Windows before pursuing such lofty hi-tech endeavors. 

    Start by becoming an admin on Domain B.


    Sunday, December 2, 2018 5:02 AM
  • I like to live in the fast lane.  Too many turkeys around, also I am an admin on both domains I just wanted wanted to run the script across the domain from another.  I'll figure it out.   


    Sunday, December 2, 2018 5:14 AM
  • You need to use the Distinguished names to remove users.

    You are actually living in the slow lane.  The fast lane means taking the time to become an expert at the technology before trying to use it.

    Please post further QAD questions in the Quest forum.  We cannot support that here.


    Sunday, December 2, 2018 5:20 AM