Log4J scanning fails to create csv file

Viewed 24
invoke-command -scriptblock {powershell -File "D:\batch\Fix-4Log4J.ps1"} -computer $Server -AsJob -JobName "Scan4Log4J" -Verbose -EA SilentlyContinue

When I run this script locally, with enter-pssession the script works just fine but NO CSV

& D:\batch\Fix-4Log4J.ps1

Yet every time I try to invoke, directly or with SAPS it fails to create file

SYNTAX of EXE:

.\log4j2-scan.exe --force-fix d:\apps c:\users --report-csv --throttle 45

Now go and run it with NO other choices....

1 Answers

...and oh my goodness, I figured it out... :)

invoke-command -scriptblock {powershell -File "D:\batch\Fix-4Log4J.ps1"} -computer $Server -AsJob -JobName "Scan4Log4J" -Verbose -EA SilentlyContinue **get-job -name Scan4Log4J| receive-job -wait**

It was the receive-job that showed WHERE that BLASTED log went! HAH!

.\log\20220909.txt

WHEW!!!

Related