![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | Seeing specific FileSystemAccessRule properties... I'm just trying to get a list of ACL permissions on a folder... Similar to when I do: >get-acl c:\ | format-list Path : Microsoft.PowerShell.Core\FileSystem::C:\ Owner : BUILTIN\Administrators Group : NT AUTHORITY\SYSTEM Access : Everyone Allow ReadAndExecute, Synchronize CREATOR OWNER Allow 268435456 NT AUTHORITY\SYSTEM Allow FullControl BUILTIN\Administrators Allow FullControl BUILTIN\Users Allow AppendData BUILTIN\Users Allow CreateFiles BUILTIN\Users Allow ReadAndExecute, Synchronize Audit : Sddl : O:BAG:SYD A;;0x1200a9;;;WD)(A;OICIIO;GA;;;CO)(A;OICI;F...However, I just want the same list, except ONLY see the text from Parth and Access. But, when I do, >get-acl c:\ | select-object path,access | format-list I get... Path : Microsoft.PowerShell.Core\FileSystem::C:\ Access : {System.Security.AccessControl.FileSystemAccessRule, System.Security.AccessControl.FileSystemAccessRule, System.Security.AccessCon trol.FileSystemAccessRule, System.Security.AccessControl.FileSystemAccessRule...} It seems that before I 'filter' out the objects, PS knows exactly what 'default' properties to show, but after the filter, it just gets lazy and throws the whole object at me. How do I manuipulate the object to get the following output? Path : Microsoft.PowerShell.Core\FileSystem::C:\ Access : Everyone Allow ReadAndExecute, Synchronize CREATOR OWNER Allow 268435456 NT AUTHORITY\SYSTEM Allow FullControl BUILTIN\Administrators Allow FullControl BUILTIN\Users Allow AppendData BUILTIN\Users Allow CreateFiles BUILTIN\Users Allow ReadAndExecute, Synchronize Thanks Much!! |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Seeing specific FileSystemAccessRule properties... I will let Jeffrey and party explain why this happens, but heres a quick script that does what you want: Function Display-Acl { Param([string]$path) $acls = get-Acl $path | Sort-Object IdentityReference Write-Host "Path: $($acls.Path)" Write-Host "Access:" foreach($acl in $acls.Access){ Write-Host `t $acl.IdentityReference $acl.AccessControlType $acl.FileSystemRights } } "Matt" <Matt@discussions.microsoft.com> wrote in message news:A2C06EA8-941B-457F-8F15-19E89171997D@microsoft.com... > I'm just trying to get a list of ACL permissions on a folder... Similar > to > when I do: >>get-acl c:\ | format-list > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > Owner : BUILTIN\Administrators > Group : NT AUTHORITY\SYSTEM > Access : Everyone Allow ReadAndExecute, Synchronize > CREATOR OWNER Allow 268435456 > NT AUTHORITY\SYSTEM Allow FullControl > BUILTIN\Administrators Allow FullControl > BUILTIN\Users Allow AppendData > BUILTIN\Users Allow CreateFiles > BUILTIN\Users Allow ReadAndExecute, Synchronize > Audit : > Sddl : O:BAG:SYD A;;0x1200a9;;;WD)(A;OICIIO;GA;;;CO)(A;OICI;F...> > However, I just want the same list, except ONLY see the text from Parth > and > Access. > > But, when I do, >>get-acl c:\ | select-object path,access | format-list > > I get... > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > Access : {System.Security.AccessControl.FileSystemAccessRule, > System.Security.AccessControl.FileSystemAccessRule, > System.Security.AccessCon > trol.FileSystemAccessRule, > System.Security.AccessControl.FileSystemAccessRule...} > > It seems that before I 'filter' out the objects, PS knows exactly what > 'default' properties to show, but after the filter, it just gets lazy and > throws the whole object at me. > > How do I manuipulate the object to get the following output? > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > Access : Everyone Allow ReadAndExecute, Synchronize > CREATOR OWNER Allow 268435456 > NT AUTHORITY\SYSTEM Allow FullControl > BUILTIN\Administrators Allow FullControl > BUILTIN\Users Allow AppendData > BUILTIN\Users Allow CreateFiles > BUILTIN\Users Allow ReadAndExecute, Synchronize > > Thanks Much!! > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Seeing specific FileSystemAccessRule properties... 2 other options, that are close get-acl c:\ | select Path -Expand Access get-acl c:\ | select Path -Expand Access | fl path,IdentityReference,AccessControlType,FileSystemRights gr /\/\o\/\/ "Brandon Shell" wrote: > I will let Jeffrey and party explain why this happens, but heres a quick > script that does what you want: > > Function Display-Acl { > Param([string]$path) > $acls = get-Acl $path | Sort-Object IdentityReference > Write-Host "Path: $($acls.Path)" > Write-Host "Access:" > foreach($acl in $acls.Access){ > Write-Host `t $acl.IdentityReference $acl.AccessControlType > $acl.FileSystemRights > } > } > "Matt" <Matt@discussions.microsoft.com> wrote in message > news:A2C06EA8-941B-457F-8F15-19E89171997D@microsoft.com... > > I'm just trying to get a list of ACL permissions on a folder... Similar > > to > > when I do: > >>get-acl c:\ | format-list > > > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > > Owner : BUILTIN\Administrators > > Group : NT AUTHORITY\SYSTEM > > Access : Everyone Allow ReadAndExecute, Synchronize > > CREATOR OWNER Allow 268435456 > > NT AUTHORITY\SYSTEM Allow FullControl > > BUILTIN\Administrators Allow FullControl > > BUILTIN\Users Allow AppendData > > BUILTIN\Users Allow CreateFiles > > BUILTIN\Users Allow ReadAndExecute, Synchronize > > Audit : > > Sddl : O:BAG:SYD A;;0x1200a9;;;WD)(A;OICIIO;GA;;;CO)(A;OICI;F...> > > > However, I just want the same list, except ONLY see the text from Parth > > and > > Access. > > > > But, when I do, > >>get-acl c:\ | select-object path,access | format-list > > > > I get... > > > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > > Access : {System.Security.AccessControl.FileSystemAccessRule, > > System.Security.AccessControl.FileSystemAccessRule, > > System.Security.AccessCon > > trol.FileSystemAccessRule, > > System.Security.AccessControl.FileSystemAccessRule...} > > > > It seems that before I 'filter' out the objects, PS knows exactly what > > 'default' properties to show, but after the filter, it just gets lazy and > > throws the whole object at me. > > > > How do I manuipulate the object to get the following output? > > > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > > Access : Everyone Allow ReadAndExecute, Synchronize > > CREATOR OWNER Allow 268435456 > > NT AUTHORITY\SYSTEM Allow FullControl > > BUILTIN\Administrators Allow FullControl > > BUILTIN\Users Allow AppendData > > BUILTIN\Users Allow CreateFiles > > BUILTIN\Users Allow ReadAndExecute, Synchronize > > > > Thanks Much!! > > > > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Seeing specific FileSystemAccessRule properties... Thanks Brandon and MOW, both of your replies got me past a big hurdle up the learning curve! "/\/\o\/\/ [MVP]" wrote: > 2 other options, that are close > > get-acl c:\ | select Path -Expand Access > > get-acl c:\ | select Path -Expand Access | fl > path,IdentityReference,AccessControlType,FileSystemRights > > gr /\/\o\/\/ > > "Brandon Shell" wrote: > > > I will let Jeffrey and party explain why this happens, but heres a quick > > script that does what you want: > > > > Function Display-Acl { > > Param([string]$path) > > $acls = get-Acl $path | Sort-Object IdentityReference > > Write-Host "Path: $($acls.Path)" > > Write-Host "Access:" > > foreach($acl in $acls.Access){ > > Write-Host `t $acl.IdentityReference $acl.AccessControlType > > $acl.FileSystemRights > > } > > } > > "Matt" <Matt@discussions.microsoft.com> wrote in message > > news:A2C06EA8-941B-457F-8F15-19E89171997D@microsoft.com... > > > I'm just trying to get a list of ACL permissions on a folder... Similar > > > to > > > when I do: > > >>get-acl c:\ | format-list > > > > > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > > > Owner : BUILTIN\Administrators > > > Group : NT AUTHORITY\SYSTEM > > > Access : Everyone Allow ReadAndExecute, Synchronize > > > CREATOR OWNER Allow 268435456 > > > NT AUTHORITY\SYSTEM Allow FullControl > > > BUILTIN\Administrators Allow FullControl > > > BUILTIN\Users Allow AppendData > > > BUILTIN\Users Allow CreateFiles > > > BUILTIN\Users Allow ReadAndExecute, Synchronize > > > Audit : > > > Sddl : O:BAG:SYD A;;0x1200a9;;;WD)(A;OICIIO;GA;;;CO)(A;OICI;F...> > > > > > However, I just want the same list, except ONLY see the text from Parth > > > and > > > Access. > > > > > > But, when I do, > > >>get-acl c:\ | select-object path,access | format-list > > > > > > I get... > > > > > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > > > Access : {System.Security.AccessControl.FileSystemAccessRule, > > > System.Security.AccessControl.FileSystemAccessRule, > > > System.Security.AccessCon > > > trol.FileSystemAccessRule, > > > System.Security.AccessControl.FileSystemAccessRule...} > > > > > > It seems that before I 'filter' out the objects, PS knows exactly what > > > 'default' properties to show, but after the filter, it just gets lazy and > > > throws the whole object at me. > > > > > > How do I manuipulate the object to get the following output? > > > > > > Path : Microsoft.PowerShell.Core\FileSystem::C:\ > > > Access : Everyone Allow ReadAndExecute, Synchronize > > > CREATOR OWNER Allow 268435456 > > > NT AUTHORITY\SYSTEM Allow FullControl > > > BUILTIN\Administrators Allow FullControl > > > BUILTIN\Users Allow AppendData > > > BUILTIN\Users Allow CreateFiles > > > BUILTIN\Users Allow ReadAndExecute, Synchronize > > > > > > Thanks Much!! > > > > > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IE7 Blocking one specific URL only | Jo-Ann | .NET General | 1 | 06-09-2008 06:46 AM |
| Where specific files are kept? | AndreaB | Vista file management | 0 | 12-14-2007 03:31 PM |
| Cannot access properties in "local area connection properties" win | Samzabrus | Vista networking & sharing | 2 | 10-09-2007 10:00 AM |
| I need help-- Can't delete one specific e-mail ! | Marita | Vista mail | 3 | 09-08-2007 07:49 AM |
| How to setup an specific sound card to work with specific programs | Stuserver | Vista installation & setup | 4 | 01-06-2007 07:01 PM |