SCRIPT - edit folder access RRS feed

  • Question

  • Hi everyone, 

    i need a little bit of help to text a script in a domain.

    I need to text a script to place in a shared folder.

    The script when execute must remove the user that execute the script( the user has not admin access obviusly ) from any group he is member, so he cannot access anymore the share.

    I don't have idea, neighter how to text the script with the correct variable neighter how to authorize him to remove himself without admin access.

    Please help me and give a detailed reply, cause i need it :)

    thanks everyone 

    see u

    • Edited by ask2019__ Monday, March 25, 2019 11:56 AM
    Monday, March 25, 2019 10:54 AM

All replies

  • Ask your domain admin to remove users from the groups.   

    Monday, March 25, 2019 5:10 PM
  • This forum is not an end user customer support forum.  You need to ask this kind of question here: http://answers.microsoft.com


    Monday, March 25, 2019 5:57 PM
  • u didn't get the scope of my question probably. 

    so ..supposing that i am the admin, but i have to write a script like that. What do u suggest??

    Tuesday, March 26, 2019 2:28 PM
  • i ll ask even there :) thanks
    Tuesday, March 26, 2019 2:28 PM
  • Your question doesn't make much sense.  Perhaps it is a  language issue. 

    A user cannot change objects that they do not have permission to change.

    A user cannot remove himself from a group.  Only an admin can do this.

    To remove a user as admin see this:

    help Remove-LocalGroupMember -online 


    Tuesday, March 26, 2019 3:26 PM