Hi Guys,
Im looking for some guidance.
I have 2 text files. neither is in any particular order
For example:
FILE1
FILE2
ERIC F JOHN B
JOHN B CHRIS T
JOE B ERIC F
CHRIS T
Im looking for a way to compare the data within these files and retrieve the names of FILE 1 that do not exist in FILE2.
I've attempted several times at using Compare function without any luck, I think im getting confused somewhere along the line.
So Far I have this:
#######COMPARE FILE CONTENTS#######
$strSFB
=Get-Content"C:\PS_SCRIPTS\0365_SKYPE_EXTERNAL_USERS\SFBUSERS.txt"
$strINPLACE
=Get-Content"C:\PS_SCRIPTS\0365_SKYPE_EXTERNAL_USERS\SFBAUDIT.txt"
Compare-Object$strSFB$strINPLACE
However, the results return each line with <= as well as =>
I've tried sorting the files alphabetically, however some reason one of the files wont Sort properly. So before going further I want to see if anyone can supply a fresh idea...
For a bit of background, the data in the 'FILE1' is a list of active Skype For business users, 'FILE2' is a list of SourceMailboxes within an In-Place hold group. The idea is to gather a list of Skype user that are not in the In-Place Hold group.
Thanks
Mike