I am finishing a last piece of this mini-app where I'm pulling names from a text file. When pulling the names from a ..txt I am filtering out certain prefixes like *eft, *nsm with code like below.
$lines = (Get-Content C:\temp\PROD\Repeat.txt -totalcount 200)
$flines = $lines|?{$_ -notlike "*eft", "nsm*", "*" , "*" .... }
$objOutputBox.Text = $flines
The problem I'm having is that it is only grabbing the "*eft" and not the rest of them. I thought I could filter an array of strings with this structure? What am I missing here if you do not mind?
Thanks