What is the command to unzip a file using 7z in powershell?
set-alias sz \"$env:ProgramFiles\\7-Zip\\7z.exe\"
sz x $zipfilePath $destinationUnzipPath -aoa -
I didn't want to use aliases, functions or Start-Process. After a little looking around the web, I've found this gem (and I can't remember where):
& ${env:ProgramFiles}\7-Zip\7z.exe x $zipfilePath "-o$($destinationUnzipPath)" -y
And you can add a > $null at the end if you don't want to see 7z's messages!