Zip and Unzip File in Powershell 4

后端 未结 5 1757
一生所求
一生所求 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:26

    Write-Zip installation could have been performed incorrectly. An incorrect manual edit of the environment parameter PSModulePath may cause it:

    Bad (original) value:

    PSModulePath = %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;C:\Program Files\Intel\
    

    Good value (which fixed the problem):

    PSModulePath = C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\Intel\
    

提交回复
热议问题