Back to Blog
Arnošt Havelka

Select Properties with Select-Object

Filter and display specific properties using Select-Object.

Start Interactive Lesson
Select Properties with Select-Object

The Select-Object cmdlet lets you choose which properties to display from objects. Keep output focused and readable.

Selecting Specific Properties

Try the command

Select specific properties!

Build the command
Get-ChildItem | Select-Object [property]
-Property NameShow only names
-Property Name, LengthShow name and size
-First 5Show first 5 items
Terminal
C:\Users\User>Get-ChildItem | Select-Object [property]

Focused Output

Command Prompt
[Shows many properties: Mode, LastWriteTime, Length, Name, etc.]
C:\Users\User>Get-ChildItem

Knowledge Check

1 / 1

How do you select only the Name property?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Filter with Where-Object

Use Where-Object to find items matching conditions.