Archiving and compression of files in Windows before extracting
Powershell
Compress-Archive -LiteralPath C:\Windows\temp\lsass.dmp -DestinationPath C:\Windows\temp\lsass.zip
ls C:\Windows\temp\lsass.zip
unzip lsass.zip
does not always work, try 7z x lsass.zip
7zip
Instructions
- Download 7za.exe from 7zip
- Download the standable version. Usually contains the description: "7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager"
- Run on target machine (Windows)
- Note: Make sure
PASSWORD_FOR_ZIP_FILE
is next to the “|” pipe symbol, no space in between. If it has space in between, you have to include the space in the password
- Note: Make sure
Tips
- Check disk space/partition before archiving a large file or folder
-
In case of timeouts given the limited shell when archiving large files
-
Create a batch file:
-
Run the batch file with
start /b archive.bat
-