PowerShell Get-ChildItem formating

cyberleo2000
cyberleo2000 used Ask the Experts™
on
Does the Get-ChildItem command return a path value? When I run:
Get-ChildItem -Path c:\temp -Recurse |Format-Table Name,Length,Path
I only get values for Name and Length.

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
PowerShell Developer
Top Expert 2010
Commented:

Hey,

It returns FullName like this:

Get-ChildItem | Select Name, FullName, Length

Is that what you're after?

If you want to find everything a CmdLet gives you have a couple of quick methods:

Get-Item "SomeFolder" | Format-List *

Or:

Get-Item "SomeFolder" | Get-Member

The latter will show the names and details of all methods and properties (members) associated with the returned object.

Chris

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial