Hello everyone,
the problem is a bit simple but I haven't found a solution for it yet. I have an array with some objects in it. Now there is another array with objects. I would like to match a property of the one type in array A with a property of the type in array B. Here
is an example:
#The csv-file has two simple columns (one with the name and one with additional info that is not important for this script).
#This means the custom object has 2 properties:
$processesToKill = Import-Csv -Path "KillThem.csv"
$AllProcesses = Get-Process
#Now I would like to match all processes in that csv with the ones on the current machine.
$ProcessesToKill = $AllProcesses | Where-Object...???? :-)
I have no idea what the best way is to do this. I would know some C#-Ways around it but maybe there is a good way in PShell to do this?
Thanks!
Christian