Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Windows 7 Forum Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

ACL - Search directories where inheritance has been broken?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 04-17-2008   #1 (permalink)
akcorr
Guest


 

ACL - Search directories where inheritance has been broken?

Is there a way to seach a directory tree and list out directories where
inherited permissions from the parent directories have been broken?

My System SpecsSystem Spec
Old 04-17-2008   #2 (permalink)
Marco Shaw [MVP]
Guest


 

Re: ACL - Search directories where inheritance has been broken?

akcorr wrote:
Quote:

> Is there a way to seach a directory tree and list out directories where
> inherited permissions from the parent directories have been broken?
There must be a way, I'm just struggling with making it work.

Pseudo-code:
1. get-acl on the directory you want to compare against.
2. loop through all the directories recursively and get their ACL.
3. compare the original ACL with the current one.
4. print something out if they are different.

I'll play with it some more...

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Old 04-17-2008   #3 (permalink)
Marco Shaw [MVP]
Guest


 

Re: ACL - Search directories where inheritance has been broken?

akcorr wrote:
Quote:

> Is there a way to seach a directory tree and list out directories where
> inherited permissions from the parent directories have been broken?
Give this a try:

PSH>$acl=get-acl . #Your base ACL you want to compare against.
PSH>
get-childitem . -recurse|where-object{$_.psiscontainer}| `
foreach-object{
if($(compare-object $((get-acl $_.fullname).access) `
$($acl.access)) -ne $null){$_.fullname}
}

Start this last command from the directory you want to look through and
compare against $acl.

(Sorry for the formatting!)

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
F3 Search Broken edde Vista performance & maintenance 4 04-03-2008 09:26 PM
Listing Directories in file Search Andy1974 PowerShell 2 02-07-2008 11:08 PM
Vista Search Horribly Broken?!?! Ninjak on FW Vista General 3 09-28-2007 11:57 PM
Vista Search Index broken Nigel Freeney Vista General 1 08-09-2007 07:40 AM
Broken Start Search Porkribs Vista General 1 08-07-2007 08:44 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51