Well, for those new to Powershell, please remember that PowerShell returns objects, not strings.
Code:
e:\utils>pshell /s "(get-content -path test -stream 'look' | select-string November).GetType()"
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False MatchInfo System.Object
Note that in post #1 of this thread, there is a blank line and then "November". That's because PowerShell returned an object.
To eliminate the blank line, cast the return type of the Object as a string;
Code:
e:\utils>pshell /s "(get-content -path test -stream 'look' | select-string November).ToString()"
November
Proof;
Code:
e:\utils>pshell /s "((get-content -path test -stream 'look' | select-string November).ToString()).GetType()"
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True String System.Object
Joe