Powershell - Compare two variables
Posted on 2016-12-01
I have to two variables. The first one contains computernames (ex. COMP01, COMP02, COMP03) and the second one also contains computernames, but with some extra fillings (ex. INFO_COMP01.txt, INFO_COMP02.txt, INFO_COMP03.txt).
Is it possible to compare these two variables and find those missing in one of the variables?
I'll use this for cleaning up, when a computer is deleted manually in AD.