7zip 4 Powershell

Hello,

Here one of the better Powershell Modules i have seen arround.
Needs Powershell 5. Powershell 5 is Standard in W10 and Server 2016. Otherwise install .Netframework 5

See Links Below for more Information.
https://github.com/thoemmi/7Zip4Powershell
https://www.nuget.org/packages/7Zip4Powershell/
https://thomasfreudenberg.com/archive/2016/02/28/7zip4powershell-in-powershell-gallery/

Install

Save-Module -Name 7Zip4Powershell -Path C:\temp
Install-Module -Name 7Zip4Powershell

Usage
The syntax is simple as this:

Expand-7Zip
    [-ArchiveFileName] <string> 
    [-TargetPath] <string>  
    [-Password <string>] | [-SecurePassword <securestring>]
    [-CustomInitialization <ScriptBlock>]
    [<CommonParameters>]

Compress-7Zip
    [-ArchiveFileName] <string> 
    [-Path] <string> 
    [[-Filter] <string>] 
    [-Format <OutputFormat> {Auto | SevenZip | Zip | GZip | BZip2 | Tar | XZ}] 
    [-CompressionLevel <CompressionLevel> {None | Fast | Low | Normal | High | Ultra}] 
    [-CompressionMethod <CompressionMethod> {Copy | Deflate | Deflate64 | BZip2 | Lzma | Lzma2 | Ppmd | Default}]
    [-Password <string>] | [-SecurePassword <securestring>]
    [-CustomInitialization <ScriptBlock>]
    [-EncryptFilenames]
    [-VolumeSize <int>]
    [-FlattenDirectoryStructure]
    [-SkipEmptyDirectories]
    [-DisableRecursion]
    [-Append]
    [<CommonParameters>]

Get-7Zip
    [-ArchiveFileName] <string[]>
    [-Password <string>] | [-SecurePassword <securestring>]
    [<CommonParameters>]

Get-7ZipInformation
    [-ArchiveFileName] <string[]> 
    [-Password <string>] | [-SecurePassword <securestring>]
    [<CommonParameters>]

Beneeth a few powershell example how you can use this Module.


  • 7 Zip Relevant Posts

  •