![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: ACL - Search directories where inheritance has been broken?
akcorr wrote:
> 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 |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: ACL - Search directories where inheritance has been broken?
akcorr wrote:
> 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 |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |