Quantcast
Channel: Spiceworks Community
Viewing all articles
Browse latest Browse all 7

Powershell, 7-zip, Password protected zip

$
0
0

try this, obviously amend the path in $process to either 32 or 64bit  program files

$process = "c:\Program Files (x86)\7-Zip\7z.exe"
$destinationFile = "c:\temp\testfile.zip"
$sourceFile = "c:\temp\*.xls"
$password = Read-Host "Enter Password"

Start-Process $process -ArgumentList "a $destinationFile $sourceFile -p$password"


Viewing all articles
Browse latest Browse all 7

Trending Articles