PowerShell Basic Set Operations

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

A set is a collection of items which can be anything. Whatever operator we need to work on these sets are in short the set operators and the operation is also known as set operation. Basic set operation includes Union, Intersection as well as addition, subtraction, etc.

Syntax

  • Group-Object

  • Group-Object -Property <propertyName>

  • Group-Object -Property <propertyName>, <propertyName2>

  • Group-Object -Property <propertyName> -CaseSensitive

  • Group-Object -Property <propertyName> -Culture <culture>

  • Group-Object -Property <ScriptBlock>

  • Sort-Object

  • Sort-Object -Property <propertyName>

  • Sort-Object -Property <ScriptBlock>

  • Sort-Object -Property <propertyName>, <propertyName2>

  • Sort-Object -Property <propertyObject> -CaseSensitive

  • Sort-Object -Property <propertyObject> -Descending

  • Sort-Object -Property <propertyObject> -Unique

  • Sort-Object -Property <propertyObject> -Culture <culture>



Got any PowerShell Question?