Please feel free to provide feedback or file bugs here.

Select-String output (MatchInfo) should be formatted after deserializing

Here's an example. The select-string output from Invoke-Command just outputs a bunch of blank lines instead of any useful info.

"hello`r`n"*6 | Out-File c:\temp\testFile.txt
write-host 'Local execution'
select-string -Path c:\temp\testfile.txt -Pattern hello -SimpleMatch

write-host 'Remote execution'
invoke-command -ScriptBlock{ select-string -Path c:\temp\testfile.txt -Pattern hello -SimpleMatch} -ComputerName localhost

2 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Mike ShepardMike Shepard shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base