Skip to content

Instantly share code, notes, and snippets.

View pipelinedave's full-sized avatar
manifesting the desired state

David "pipelinedave" Hallmann pipelinedave

manifesting the desired state
View GitHub Profile
@pipelinedave
pipelinedave / Get-Duplicates.ps1
Last active May 15, 2020 13:56
powershell / Get duplicates from a csv file
$data = Import-Csv -path .\test.csv
$unique = $data | Select-Object -Unique
$data | Where-Object { $_ -notcontains $unique }
Compare-Object -ReferenceObject $data -DifferenceObject $unique -IncludeEqual | Where-Object { $_.SideIndicator -eq "==" } | Select-Object -ExpandProperty InputObject