With only few steps, you can easily and quickly use UltimateZip component in PowerShell as described below:
To load UltimateZip component for using in PowerShell, simply use the [Reflection.Assembly]::LoadFrom command as demonstrated below:
PS C:\> [Reflection.Assembly]::LoadFrom("C:\Program Files (x86)\ComponentPro\UltimateZip vX.X.X.X\Bin\Net\ComponentPro.Zip.dll")
PS C:\> [Reflection.Assembly]::LoadFrom("ComponentPro.Zip, Version=X.X.X.X, Culture=neutral, PublicKeyToken=57834bcd05a91756")
Now you are ready to use all classes inside the UltimateZip component. For example, to create a new archive and add files to the archive, you can use the following script:
PS C:\> $zip = New-Object ComponentPro.Compression.Zip PS C:\> $zip.Create("test.zip") PS C:\> $zip.AddFile("test.dat") PS C:\> $zip.Close() PS C:\> $zip.Dispose()