Re: problems with formatting get-acl output
- From: "Seva" <Seva@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 Jan 2006 06:13:02 -0800
Hi Abhishek,
thanks for the pointer. It would do as a work around, I suppose.
Still, looks like a bug to me. Apparently "-wrap" option causes format-table
cmdlet to execute completely different path, which is rather strange.
Regards,
Seva.
"Abhishek Agrawal" wrote:
> The actual property you are looking for is "AccessToString", which is
> labelled "Access" for ObjectSecurity Type. (Look in
> DotNetTypes.format.mshxml) AccessToString is a scriptProperty used to
> converts the Access rule collection to a useful output.
>
> Try running the following
>
> MSH> $format = @{Expression={$_.AccessToString;Label="Access"}
> MSH> get-acl c:\autoexec.bat | format-table Path,$format
>
> also try running
> MSH> get-acl c:\autoexec.bat | gm
> to get a list of extensions we add to the FileSecurity object.
>
> Thanks,
> Abhishek Agrawal [MSFT]
> MSH Team
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
> "Seva" <Seva@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:8B327D91-3D90-424D-8084-320DB9927775@xxxxxxxxxxxxxxxx
> >I noticed that built-in cmdlets format-table and format-wide have issues
> >with
> > resolving display names for security principals when non-default
> > parameters
> > are used.
> >
> > With defaul parameters, security principal name is resolved correctly, but
> > output is truncated to fit the screen.
> >
> > MSH C:\> get-acl c:\autoexec.bat | format-table
> >
> > Path Owner Access
> > ---- ----- ------
> > Microsoft.Management.Au... BUILTIN\Administrators NT AUTHORITY\SYSTEM
> > Al...
> >
> > If I try to use wrapping, instead of names class (or exception?) names are
> > listed
> >
> > MSH C:\> get-acl c:\autoexec.bat | format-table path,access -wrap
> >
> > Path Access
> > ---- ------
> > Microsoft.Management.Automation.Core\Fi
> > {System.Security.AccessControl.FileSyst
> > leSystem::C:\autoexec.bat emAccessRule,
> > System.Security.AccessCon
> > trol.FileSystemAccessRule,
> > System.Secur
> >
> > ity.AccessControl.FileSystemAccessRule,
> >
> > System.Security.AccessControl.FileSyst
> > emAccessRule}
> >
> > Format-list seem to work OK.
> > Is this a known bug in MSH?
> >
> > Regards,
> > Seva.
>
>
>
.
- Follow-Ups:
- Re: problems with formatting get-acl output
- From: Kevin Loo [MSFT]
- Re: problems with formatting get-acl output
- References:
- Re: problems with formatting get-acl output
- From: Abhishek Agrawal
- Re: problems with formatting get-acl output
- Prev by Date: Re: Avoiding output message through [void]
- Next by Date: Re: How can I change "Allow this number of users" value for user share
- Previous by thread: Re: problems with formatting get-acl output
- Next by thread: Re: problems with formatting get-acl output
- Index(es):
Relevant Pages
|