Tutorial by Examples

Filter an enumeration by using a conditional expression Synonyms: Where-Object where ? Example: $names = @( "Aaron", "Albert", "Alphonse","Bernie", "Charlie", "Danny", "Ernie", "Frank") $names | Where-Object {...
Sort an enumeration in either ascending or descending order Synonyms: Sort-Object sort Assuming: $names = @( "Aaron", "Aaron", "Bernie", "Charlie", "Danny" ) Ascending sort is the default: $names | Sort-Object $names | sort Aaron Aa...
You can group an enumeration based on an expression. Synonyms: Group-Object group Examples: $names = @( "Aaron", "Albert", "Alphonse","Bernie", "Charlie", "Danny", "Ernie", "Frank") $names | Group-Object -Prope...
Projecting an enumeration allows you to extract specific members of each object, to extract all the details, or to compute values for each object Synonyms: Select-Object select Selecting a subset of the properties: $dir = dir "C:\MyFolder" $dir | Select-Object Name, FullName, Att...

Page 1 of 1