none
Powershell 5.0 script not working in 2.0 RRS feed

  • General discussion

  • hi. I have made a script to unzip the files in PowerShell 5.0. i am deploying the script in win 7 sp1 system which have 2.0 version. script is not working. the script is....

    $sourceFile = 'C:\Windows\Temp\abc.zip'
    $targetFolder = 'C:\Windows\Temp\abc'
    [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')
    [System.IO.Compression.ZipFile]::ExtractToDirectory($sourceFile, $targetFolder)

    Could you please help me to find the solution. Thanks


    • Edited by Vish-01 Thursday, May 3, 2018 8:57 PM
    • Changed type Bill_Stewart Friday, July 27, 2018 6:37 PM
    • Moved by Bill_Stewart Friday, July 27, 2018 6:37 PM This is not "debug/fix/rewrite my script for me" forum
    Wednesday, May 2, 2018 10:12 PM

All replies