Friday, May 20, 2016

PowerShell cmdlet of the Day : Compress-Archive

In the previous blog post we have seen how to extract a ZIP file.

But what about, how you can create a zip file by using PowerShell.

It's simple again, by using the Compress-Archive cmdlet.  The syntax of Compress-Archive cmdlet is simple, provide the -Path of the folder which you want to compress, then provide the      -DestinationPath of your .zip file and then set a -CompressionLevel, and after that hit enter.


Compress-Archive -CompressionLevel Optimal -Path C:\temp\Data\

-DestinationPath C:\temp\


In the the above command, I have set the -compressionLevel to Optimal , and then  provided the -path of my folder which I wan to zip and then the destination path of new zip file which in And hit enter, in the below screenshot you can see that it has started creating a zip file. 


Aman Dhally, Manya Kaur


In the below folder you can see, that our zip file is successfully created. Yayyy!!!!!


Aman Dhally, Manya Kaur

Thanks for the reading blog post.

Aman Dhally, Manya Kaur

With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel
for PowerShell video tutorials. You can download all of my scripts from “Microsoft
TechNet Gallery”.


  1. It will be useful for students to find out more about writing scholarship essay. It may help you in college if you want to have more money.

  2. Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also.It helps me in Research Report

  3. I am very impressed and found that it is very useful.
    SAFEALL Security Systems In India

  4. For students writing academic papers can be a daunting challenge. It's okay because not all people can be excellent at custom or academic writing. That's the very moment when this writing service give a helping hand

  5. All of our best custom essay writing service will always be 100% unique and authentic work composed by an essayist on our writing team as plagiarism is a crucial area when it comes to seeking custom writing services from our custom essay company.

  6. The quality of our Best Essay Writing Service are always high as we work hard to ensure that we uphold our good reputations at all time. We make sure that Nursing Essay Writing Services ordered are delivered on time and our prices are affordable to every student.