I have created a ps1 script to extract a 3Gb zip folder. It works Whenever I run it from PowerShell ISE but when I add my script to windows server 2019 task scheduler it just says running and it doesn't do anything.
I tried
set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
Set-location C:\
sz x -oC:/ test.zip
I also tried
setx path "%path%;C:\Program Files\7-Zip"
Set-location C:\
7z x test.zip -oc:\ -r
I expect to extract the 3gbs folder.