Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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.

http://technet.microsoft.com/en-us/library/hh849810.aspx

http://technet.microsoft.com/en-us/library/ee176838.aspx

share|improve this answer

Your Answer

 
discard

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.