Episode 10 – Select-Object

Download the MP3 Podcast

In this episode we explore all of the possibilities for one of the most used PowerShell cmdlets.

Basic Example:

Get-Process |select name, id

Parameters discussed:

  • First
  • Last
  • Skip
  • Unique

Return a string collection of the process names rather than an object with only a name property

Get-Process |select -ExpandProperty Name

Return the collection that exists within the access property

Get-Acl |select -ExpandProperty Access

Create a custom property with Name/Expression Hash

Get-Process |select @{Name='Modified Name';Expression={$_.Name + "_Modified"}}

Brought to you by The Windows PowerShell Bible 2.0 and PowerShellGroup.Org

Advertisements

About Tome

Tome is a Windows engineer for a market-leading global financial services firm in New York City. He is the founder and leader of the New York City PowerShell User group, a blogger, a regular contributor to Microsoft's Windows PowerShell forum, and he has received the MVP award for Windows PowerShell from Microsoft. He is currently working on the PowerShell Bible, which is due out in June 2011 from Wiley.

Posted on September 19, 2011, in Core Cmdlets, PowerShell. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: