Archiving and compression of files in Windows before extracting #
Powershell #
| 1 2 |  | 
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)
    1 echo PASSWORD_FOR_ZIP_FILE| 7za.exe a -mhe -p zip_file_name C:\target\folder\*- Note: Make sure PASSWORD_FOR_ZIP_FILEis 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
    1 echo list volume|diskpart
- 
In case of timeouts given the limited shell when archiving large files - 
Create a batch file: 1 2 archive.bat echo PASSWORD_FOR_ZIP_FILE| 7za.exe a -mhe -p zip_file_name C:\target\folder\*
- 
Run the batch file with start /b archive.bat
 
- 
  
    
      Last update: April 16, 2022