Get information back from executed command

Get information back from executed command

There is a powershell command to check if any files related to the Log4J vulnerability exists on an endpoint. I know it doesn't suffice, but to have a start, I would like to run the command on all endpoints and get back the result. I hope this is possible.

Command:
  1. gci 'C:\' -rec -force -include *.jar -ea 0 | foreach {select-string "JndiLookup.class" $_} | select -exp Path

Thanks,

JABIR

                  New to ADSelfService Plus?