From ce6172ece3a1728bd575faead959df37a2fc0261 Mon Sep 17 00:00:00 2001 From: Martijn <12066560+Kipjr@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:17:31 +0200 Subject: [PATCH] Update setOperations.ps1 --- setOperations.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setOperations.ps1 b/setOperations.ps1 index 037b3f2..3d0f0ab 100644 --- a/setOperations.ps1 +++ b/setOperations.ps1 @@ -134,11 +134,11 @@ function Get-SetOperationResult #----------- if ($OperationType -eq 'Difference-LeftMinusRight') { - $result = $Left | ?{-not ($Right -contains $_)} + $result = $Left | Where-Object {-not ($Right -contains $_)} } if ($OperationType -eq 'Difference-RightMinusLeft') { - $result = $Right | ?{-not ($Left -contains $_)} + $result = $Right | Where-Object {-not ($Left -contains $_)} } #----------- @@ -147,12 +147,12 @@ function Get-SetOperationResult if ($OperationType -eq 'ComplementLeft') { $result = Compare-Object $Left $Right -PassThru -IncludeEqual | # union - ?{-not ($Left -contains $_)} + Where-Object {-not ($Left -contains $_)} } if ($OperationType -eq 'ComplementRight') { $result = Compare-Object $Left $Right -PassThru -IncludeEqual | # union - ?{-not ($Right -contains $_)} + Where-Object {-not ($Right -contains $_)} } Write-Output $result @@ -161,4 +161,4 @@ function Get-SetOperationResult END { } -} \ No newline at end of file +}