header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Using Get-ACL to view only explicit permissions
Last Post 26 Jan 2008 02:55 AM by marco.shaw. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
rodstewartUser is Offline
New Member
New Member
Posts:1
Avatar

--
25 Jan 2008 06:49 PM  

Is there a way to filter Get-ACL to see only explicit permissions and ignore files that do not have explicit permissions applied to them?

The basic goal I have is to view all ACLs applied to a file except for ACEs for BUILTIN/ADMINISTRATORS as this is a permissions inherited from the top-level folders.

This is the code I'm currently using:

get-childitem \\server\share -recruse | get-acl | where {$_.accesstostring -notlike "*admin*"}

However, this does indeed block the administrators from displaying, but since administrators is in every ACL, it also blocks everything else from applying.

Any ideas?

marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:188
Avatar

--
26 Jan 2008 02:55 AM  
Does Admin always show up first? If so, try:

(get-childitem \\server\share -recurse | get-acl |%{$_.accesstostring}).substring(42)
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer