Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for a simple Powershell way to set NTFS permissions on a specific folder.

Get-Acl "\\fileserver\c$\Program Files\Target" is not even working for me. Any ideas?

share|improve this question

closed as not a real question by Brent Pabst, Scott Pack, voretaq7 Nov 13 '12 at 18:58

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Either way, you have not posted enough information with this question for us to help you. –  Brent Pabst Nov 13 '12 at 14:59
    
You should tell us why isn't not working. What error do you get, etc? Take a peek at How to Ask, it will help you ask a useful question that can be valuable to others. –  MDMarra Nov 13 '12 at 15:06
    
In addition to How to Ask, please take a look at this meta question which may help you improve this question. If you can edit this question to include enough information for us to help you leave a comment for me and I'll reopen it. –  voretaq7 Nov 13 '12 at 18:58

1 Answer 1

What you want to do is use get-acl and save it to a variable. Then, you can modify that variable and push it to the file/folder in question using set-acl

There are some good examples here and even more examples here.

If that's too complicated (it can get a bit messy at times), you can always just call icacls.exe from your PowerShell script and do it the old-fashioned way.

share|improve this answer

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