![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Remove all NTFS Permissions from Folder Hello I would like remove NTFS permission form folder My folder have the standard Administrators Creator owner System Users (Host\Users) How delete all items and how delete the item Users? My experiment: $directory = "c:\data" $acl = get-acl $directory $account = new-object system.security.principal.ntaccount("Users") $acl.purgeaccessrules($account) set-acl -aclobject $acl -path $directory this is missing... How you have a idea? thanks Gregor |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: Remove all NTFS Permissions from Folder Removing domain groups works fine however local groups does not get effected. I found that if you remove the "inherit from parent" flag (gui) then the code runs fine and the group is removed. ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||
| Guest | RE: Remove all NTFS Permissions from Folder How about using the built-in cacls.exe utility to do the same for top_of_folder and all sub-folders: cacls top_of_folder /c /t /e /r users Not strictly a POSH solution but can be called within a .ps1 script or run from POSH console. HTH. -- http://www.leedesmond.com/weblog/ "Gregor" wrote:
| ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to list out ntfs permissions | Frank | PowerShell | 3 | 11-16-2007 09:30 AM |
| Copy NTFS permissions | BMC | PowerShell | 1 | 08-01-2007 02:02 PM |
| NTFS Permissions on System Folders in Vista | Todd Bowlsby | Vista General | 7 | 07-11-2007 11:32 PM |
| NTFS permissions for a domain user | RedParanoid | Vista networking & sharing | 0 | 04-28-2007 02:04 AM |
| NTFS Security Permissions (HOW TO RESET?) | Mike (Bryett Enterprise LTD) | Vista security | 4 | 06-14-2006 12:54 PM |