Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some specific folders that I grant members of my team permissions to. So I'll share a specific folder and add them as permissions. But after they are done I usually remove them from the list of permitted users.

I was wondering if it's possible to setup a bat file to achieve this, to make my life easier. I was wondering if WMI or powershell has those kinds of capabilities.

Just curious.


share|improve this question
up vote 0 down vote accepted

What you are looking for are "Get-ACL" and "Set-ACL". They are your one stop shop for permission control. I even found a quick few tutorial on how to use it to add security settings. You basically export the current ACL to an object, modify the object, and then overwrite the permissions set on the object.

Hope that helps.

share|improve this answer

I suggest to add your team in a group and add that group to that folder. So when you want to take them out, you just delete the group from that folder's permission list.

That's what I'd do since I'm not a script guru.

share|improve this answer
+1 Simple solution – Dave M Feb 24 '10 at 21:44
Thanks, but looking for a more advanced solution with scripting to see if its possible... – Brian Mains Feb 25 '10 at 13:34

You can still use the built-in command cacls.exe on Windows XP to chance permissions on files and folders. Use a batch file for recurring use. This may be easier than using Powershell if you are not very familiar with it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .