I am having a problem with a powershell script I am trying to write. I want to compare multiple .txt files to a master .txt file. If the user are in the master .txt file remove it from the .txt file. Then I want it to copy the new txt file with removed users to .\output\orginalname.txt. For example:
serv1_Users.txt - james mike
serv2_Users.txt - james mike admin bob
Serv3_Users.txt - james bob marry admin
User_Ignore.txt - admin marry bob
Compare (User_Ignore file and remove admin marry bob from the Serv1 Serv2 Serv3 files and output them to:
.\output\serv1_Users.txt
.\output\serv2_Users.txt
.\output\serv3_Users.txt
I have tried many ways to do this but it doesn't work.