Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 a local Windows network with a Windows Server 2008 whose purpose is to act as a file server. I'm the administrator.

I want to grant user full access to all the files on a certain directory i.e. D:\. This "super power" period should only last for a day and then return to the original permission status.

How can I do this with PowerShell (or the old VBScript)? Or what would a Windows administrator typically do (with scripting and not GUI)?

share|improve this question

You could use the Set-ACL cmdlet to grant the permissions, then schedule a task that runs a different script using Set-ACL to remove the permissions.

I would also use Get-ACL and export the current ACL to somewhere so it's easier to roll back.

I've used it before but can't find the script, however you can set inherit permissions and so forth also.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.