Compress and decompress file

To compress and decompress file in Powershell is quite straight forward.

#compress "test" folderCompress-Archive -Path "D:\temp3\test" -DestinationPath "D:\temp3\myFirstZipFile.zip"

#decompress the file to "testFolder" folder.
Expand-Archive -Path "D:\temp3\myFirstZipFile.zip" -DestinationPath "d:\temp3\testFolder"

# to decompress the file back to the
Expand-Archive -Path "D:\temp3\myFirstZipFile.zip" -DestinationPath "d:\temp3\"

Comments

Popular posts from this blog

Scheduled task in Windows Task Scheduler - part 3

Create scheduled task in Windows Task Scheduler

Get all website entries in IIS