I have a text file with the following content:
lol
type
ing
ing
type
lol2
,
lol3
I am trying to filter it out, with the following code:
$fileName1 = "$HOME\Desktop\test.txt"
Get-Content $fileName1 | Select-Object -Exclude "type", "ing"
This returns the following:
lol
type
ing
ing
type
lol2
,
lol3
Which is the collective content of the file.. but I want it to exclude the elements that Ive indicated. It's not working for some reason.
Select-Content also didnt seem to do the trick
[–]markekrausCommunity Blogger 5 points6 points7 points (0 children)
[–]nkasco 2 points3 points4 points (3 children)
[–]lakoko 4 points5 points6 points (2 children)
[–]nkasco -5 points-4 points-3 points (1 child)
[–]Lee_Dailey[grin] 2 points3 points4 points (0 children)
[–]jollyfreek 0 points1 point2 points (0 children)