I am using PowerShell 2.0 and can not update to a later version. I need to be able to compress a folder into a ZIP. I have scoured Stack Overflow and have found nothing that helps me.
This is one thing that I have tried and it throws an error.
Add-Type -Assembly "System.IO.Compression.FileSystem"
[io.compression.zipfile]::CreateFromDirectory("Source", "Destination")
I wanted this to compress the folder that I specified at "Source" and put it in the specified "Destination"
I got this error: Add-Type : Cannot add type. The assembly 'System.IO.Compression.FileSystem' could not be found.