Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 07, 2011 10:09 PM by nadeemzaki
Member
3 Points
15 Posts
Jun 10, 2010 12:39 PM|LINK
hi all,
i've written a small code to retireve the ACL of a folder (using get-acl), it's working fine for displaying the permissions, but i also want it to display whether the ACL object is "inherited" or "not inherited"
for eg. if i have \\server\share\folder1\folder2
let's say folder2 has extra security groups added on it's level then i want my script to display the they are "not inherited"
presently this is what my commnad does :
get-acl <path> | format-list
if i run : get-acl c: | format-list
then this is the output i get
Path : Microsoft.PowerShell.Core\FileSystem::C:\ Owner : BUILTIN\Administrators Group : BUILTIN\Administrators Access : Everyone Allow ReadAndExecute, Synchronize CREATOR OWNER Allow 268435456 NT AUTHORITY\SYSTEM Allow FullControl NT AUTHORITY\SYSTEM Allow 268435456 BUILTIN\Administrators Allow 268435456 BUILTIN\Administrators Allow FullControl
but wht i want it to dispaly is something like this :
Path : Microsoft.PowerShell.Core\FileSystem::C:\ Owner : BUILTIN\Administrators Group : BUILTIN\Administrators Access : Everyone Allow ReadAndExecute, Synchronize CREATOR OWNER Allow 268435456 NT AUTHORITY\SYSTEM Allow FullControl Not Inherited NT AUTHORITY\SYSTEM Allow 268435456 Not inhgerited BUILTIN\Administrators Allow 268435456 Inherited from ...
can any1 tell me the parameter for the same....
p.s. : @moderators : if this is wrong section pls move my thread to correct section...
328 Points
129 Posts
Jun 10, 2010 04:30 PM|LINK
This is definitely the wrong thread.
Anyway, you can try this and see if this is what you want.
get-acl c: | % { $_.access }
2 Points
1 Post
Jul 07, 2011 10:09 PM|LINK
you can have it in much formated way like
get-acl C:\ | % {$_.access} | format-table -wrap
sk8er_boi
Member
3 Points
15 Posts
Powershell command "Get-Acl" help...
Jun 10, 2010 12:39 PM|LINK
hi all,
i've written a small code to retireve the ACL of a folder (using get-acl), it's working fine for displaying the permissions, but i also want it to display whether the ACL object is "inherited" or "not inherited"
for eg. if i have \\server\share\folder1\folder2
let's say folder2 has extra security groups added on it's level then i want my script to display the they are "not inherited"
presently this is what my commnad does :
get-acl <path> | format-list
if i run : get-acl c: | format-list
then this is the output i get
Path : Microsoft.PowerShell.Core\FileSystem::C:\
Owner : BUILTIN\Administrators
Group : BUILTIN\Administrators
Access : Everyone Allow ReadAndExecute, Synchronize
CREATOR OWNER Allow 268435456
NT AUTHORITY\SYSTEM Allow FullControl
NT AUTHORITY\SYSTEM Allow 268435456
BUILTIN\Administrators Allow 268435456
BUILTIN\Administrators Allow FullControl
but wht i want it to dispaly is something like this :
Path : Microsoft.PowerShell.Core\FileSystem::C:\
Owner : BUILTIN\Administrators
Group : BUILTIN\Administrators
Access : Everyone Allow ReadAndExecute, Synchronize
CREATOR OWNER Allow 268435456
NT AUTHORITY\SYSTEM Allow FullControl Not Inherited
NT AUTHORITY\SYSTEM Allow 268435456 Not inhgerited
BUILTIN\Administrators Allow 268435456 Inherited from ...
can any1 tell me the parameter for the same....
p.s. : @moderators : if this is wrong section pls move my thread to correct section...
kiphup
Member
328 Points
129 Posts
Re: Powershell command "Get-Acl" help...
Jun 10, 2010 04:30 PM|LINK
This is definitely the wrong thread.
Anyway, you can try this and see if this is what you want.
get-acl c: | % { $_.access }
nadeemzaki
Member
2 Points
1 Post
Re: Powershell command "Get-Acl" help...
Jul 07, 2011 10:09 PM|LINK
you can have it in much formated way like
get-acl C:\ | % {$_.access} | format-table -wrap