
So here is what you are doing in function form to clean it up a bit Function Open-7ZipFile) + " `"$Source`""Īnd here is how to run it Open-7ZipFile -ExePath7Zip "C:\Program Files\7-Zip\7z.exe" -Source "C:\Users\touff\OneDrive\Bureau\0\Encrypted Zip\test.zip" -Destination "C:\Users\touff\OneDrive\Bureau\0\Encrypted Zip\foldertest" -Password "Password" = C:\Users\touff\OneDrive\Bureau\0\Encrypted Zip\test.zipĮRROR: Can not open output file : Accès refusé. $command = "& $7ZipPath e -oC:\ -y -tzip -p$password $zipFile"ħ-Zip 16.04 : Copyright (c) 1999-2016 Igor Pavlov : Įxtracting archive: C:\Users\touff\OneDrive\Bureau\0\Encrypted Zip\test.zip

$password = Read-Host -Prompt 'Input the password'

$path = 'C:\Users\touff\OneDrive\Bureau\0\Encrypted Zip\foldertest' $zipFile = '"C:\Users\touff\OneDrive\Bureau\0\Encrypted Zip\test.zip"' Here's the code: $7ZipPath = '"C:\Program Files\7-Zip\7z.exe"' I created a simple code that's supposed to unzip a file using 7zip and a known password. Hi, I'm new to powershell and try to learn some trick with it.
