Hi folks. I have two text files. One has a list of servers (manually created, sorted) one line at a time. The second file also has server names and should have the same server host names as the first text file (the list is acquired from a different source).
I know of the compare-object (gc txt 1 file) (gc txt 2 file) | format-list command. but it shows the sideindicator => or <= results. Is there another way, maybe with select-string that would confirm that all unique objects in the first file are present in the second txt file? And if one server name is missing in the second file, do a write-host "server xxx is not present". Thanks much