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
When I run this script locally, with enter-pssession the script works just fine but NO CSV&
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….
Yet every time I try to invoke, directly or with SAPS it fails to create file
Now go and run it with NO other choices….
..and oh my goodness, I figured it out… 🙂
It was the receive-job that showed WHERE that BLASTED log went! HAH!
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**
.\log\20220909.txt
WHEW!!!