Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Compress and Decompress Files with Powershell on

Learn how to compress and decompress files with powershell on with clear steps, practical tips, and troubleshooting advice for a smoother, more reliable.

Table of Contents

This practical guide walks through how to compress and decompress files with powershell on, explains the main requirements, and highlights common issues that may appear along the way.

1. Compress files and folders with PowerShell

To compress files in the PowerShell file, we will use the following command:

Compress-Archive -Path file path, root directory -DestinationPath file path, destination directory

Inside:

file path, root directory: Is the file path, root directory with the file extension name.

file path, destination directory: Is the file path, compressed directory + compressed file/folder name that you set.

Step 1: You open PowerShell by going to the Search menu (1) => search with the keyword PowerShell (2) => Windows PowerShell (3).

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Step 2: You enter the following command.

Compress-Archive -Path

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Next, you can get the file path to compress by right-clicking on the file (1) => Properties (2).

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Next, memorize the file address, file name (circled in red) or highlight the address and file name and press Ctrl + C to copy.

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Then, you enter or paste (press Ctrl + V) the address and file name into PowerShell.

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Step 3: Paste the command line behind.

-DestinationPath

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Next, enter the destination folder address after extracting the file and insert the file name and press Enter to compress the file.

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

After done, the PowerShell command does not report an error.

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Step 4: Then, you open the folder and check the compressed file.

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

Compressed file works fine and shows full archive as success.

1. Compress files and folders with PowerShell — How to Compress and Decompress Files with Powershell on

2. Compress multiple files with PowerShell

Compress multiple files with PowerShell, use the following command:

Compress-Archive -LiteralPath file path 1, file path 2, file path n -DestinationPath directory path, compressed file

Inside:

file path 1, file path 2, file path n: is the file path you need to compress.

folder path, compressed file: is the path to the compressed folder + the file name you set.

Step 1: After determining the path and name of the compressed file to create.

2. Compress multiple files with PowerShell — How to Compress and Decompress Files with Powershell on

Step 2: You enter the command with the syntax presented above to create the compressed file.

2. Compress multiple files with PowerShell — How to Compress and Decompress Files with Powershell on

Step 3: You check the compressed file after completion.

2. Compress multiple files with PowerShell — How to Compress and Decompress Files with Powershell on

If the compressed file works well and has enough files as you requested, it is successful.

2. Compress multiple files with PowerShell — How to Compress and Decompress Files with Powershell on

3. Extract files with PowerShell

Step 1: To decompress the file in this way, the compressed file must be in .zip format. Next, you specify the file name and directory containing the file.

3. Extract files with PowerShell — How to Compress and Decompress Files with Powershell on

Step 2: You open PowerShell and execute the command with the following syntax.

Expand-Archive -LiteralPath archive path -DestinationPath destination directory path

Inside:

zip file path: Is the path to the compressed .zip file to decompress.

destination directory path: The path to the directory after extracting the file.

3. Extract files with PowerShell — How to Compress and Decompress Files with Powershell on

Step 3: You check the file after extracting.

3. Extract files with PowerShell — How to Compress and Decompress Files with Powershell on

If enough files and files work fine then success!

3. Extract files with PowerShell — How to Compress and Decompress Files with Powershell on

With basic and easy to follow instructions with the command line in PowerShell, you can perform compression and decompression of files in a unique way. Good luck!

Key Takeaways

Use the information above as a practical reference for how to compress and decompress files with powershell on. Review each step carefully, confirm any requirements, and choose the option that best fits your situation.

FAQ

What does this guide explain about Compress and Decompress Files with Powershell on?

It explains the main concepts, practical considerations, and useful steps related to compress and decompress files with powershell on without requiring advanced knowledge.

Who can benefit from learning about Compress and Decompress Files with Powershell on?

This information is useful for readers who want a clear overview, practical guidance, and reliable steps related to compress and decompress files with powershell on.

What should I check before applying this information?

Review the requirements, confirm that your device, software, or situation matches the instructions, and back up important data before making major changes.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.