PowerShellBasic Set Operations


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>