I am creating a script to check if there is no match in the name of the pc's in my csv file (source) and the AD and recover the names of pc's that do not match with the AD in order to extract them in a csv file.
But also to do in the other direction, that is to say to check the names of the pc contained in the AD which do not have any correspondence with the csv file and to extract the whole in the same csv file.
In order to update our inventory and to make a more precise follow-up of the PCs.
I tried with the like and notlike parameters but it doesn't output what I want, either I get the name that matches between the AD and the csv file or I get the entire contents of the csv file.