Hello All,
Hopefully, someone can help with my issue. I'messentially looking to match one value with a static list of values from another csv(essentially a vloopupbut in PowerShell). I have it working okay with small data sets (less then 10) but it is not working for larger sets(1000-10,000).
Any help would be greatly appreciated,
Here is the idea
CSV1:
Name, email, data1, group
John, johndoe@msn.com,red, TEST_T1_01
Jim, jimmy@msn.com,blue, TEST_T2_02
Bill, billy@msn.com, yellow, TEST_T3_03
CSV2:
group, groupid
TEST_T1_01, /TEST/T1/01
TEST_T2_02./TEST/T2/02
TEST_T3_03./TEST/T3/03
---------
$csv1 = Import-Csv -Path 'C:\CSV1.csv'
$csv2 = Import-Csv -Path 'C:\CSV2.csv'
$groupmatch = Compare-Object -ReferenceObject $csv1.group -DifferenceObject $csv2.Maingroup -IncludeEqual | #Posh v3
Where-Object {$_.SideIndicator -eq "=="} |
Select-Object -ExpandProperty...