Zip and Unzip File in Powershell 4

后端 未结 5 1673
一生所求
一生所求 2021-02-13 22:14

I am using Windows Server 2012 R2 (64 bit). I have powershell version 4 available in it. I am trying to zip and unzip files. When I try Write-Zip command, it throws me following

5条回答
  •  孤街浪徒
    2021-02-13 22:49

    If you can upgrade to PowerShell V5 (https://www.microsoft.com/en-us/download/details.aspx?id=50395), it has them natively. https://richardspowershellblog.wordpress.com/2014/10/25/powershell-5-zip-and-unzip/

    For PowerShell version 4, you may be able to use this search http://www.powershellgallery.com/items?q=zip&x=0&y=0. This also looks to do what you are looking for: https://www.powershellgallery.com/packages/Microsoft.PowerShell.Archive/1.0.1.0

    To install the modules, you need to type:

    install-module -name 
    
    • powershellgallery.com is a free to upload site. Please check and understand module before running it.

    Hope this helps. Thanks, Tim.

提交回复
热议问题