{"id":20628649,"url":"https://github.com/thoemmi/7zip4powershell","last_synced_at":"2026-01-16T15:30:39.867Z","repository":{"id":37385145,"uuid":"6411224","full_name":"thoemmi/7Zip4Powershell","owner":"thoemmi","description":"Powershell module for creating and extracting 7-Zip archives","archived":false,"fork":false,"pushed_at":"2025-01-17T21:40:28.000Z","size":15468,"stargazers_count":409,"open_issues_count":16,"forks_count":66,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-06T13:01:33.301Z","etag":null,"topics":["7-zip","c-sharp","cmdlet","compression","encryption","powershell","sevenzip"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoemmi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-26T22:17:18.000Z","updated_at":"2025-04-04T14:18:58.000Z","dependencies_parsed_at":"2024-05-31T20:26:28.768Z","dependency_job_id":"bc682108-766f-4b00-b7f0-f71e7300a8fe","html_url":"https://github.com/thoemmi/7Zip4Powershell","commit_stats":{"total_commits":153,"total_committers":10,"mean_commits":15.3,"dds":0.3202614379084967,"last_synced_commit":"bd4c5d5f1e35169bed9066dccc2c41693bb05462"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoemmi%2F7Zip4Powershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoemmi%2F7Zip4Powershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoemmi%2F7Zip4Powershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoemmi%2F7Zip4Powershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoemmi","download_url":"https://codeload.github.com/thoemmi/7Zip4Powershell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741147,"owners_count":21154249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7-zip","c-sharp","cmdlet","compression","encryption","powershell","sevenzip"],"created_at":"2024-11-16T13:21:58.643Z","updated_at":"2026-01-16T15:30:39.803Z","avatar_url":"https://github.com/thoemmi.png","language":"C#","readme":"# 7Zip4Powershell\n\nPowershell module for creating and extracting 7-Zip archives supporting Powershell's `WriteProgress` API.\n\n![Screenshot](https://raw.githubusercontent.com/thoemmi/7Zip4Powershell/master/Assets/compression.gif)\n\n\u003e [!IMPORTANT]\n\u003e Please note that this repository is not maintained anymore. I've created it a couple\n\u003e of years ago to fit my own needs (just compressing a single folder). I love that lots\n\u003e of other users find my package helpful.\n\u003e\n\u003e I really appreciated if you report issues or suggest new feature. However,\n\u003e I don't use this package myself anymore, and I don't have the time to\n\u003e maintain it appropriately. So please don't expect me to fix any bugs. Any Pull\n\u003e Request is welcome though.\n\n## Usage\n\nThe syntax is simple as this:\n\n```powershell\nExpand-7Zip\n    [-ArchiveFileName] \u003cstring\u003e\n    [-TargetPath] \u003cstring\u003e\n    [-Password \u003cstring\u003e] | [-SecurePassword \u003csecurestring\u003e]\n    [\u003cCommonParameters\u003e]\n\nCompress-7Zip\n    [-ArchiveFileName] \u003cstring\u003e\n    [-Path] \u003cstring\u003e\n    [[-Filter] \u003cstring\u003e]\n    [-OutputPath] \u003cstring\u003e\n    [-Format \u003cOutputFormat\u003e {Auto | SevenZip | Zip | GZip | BZip2 | Tar | XZ}]\n    [-CompressionLevel \u003cCompressionLevel\u003e {None | Fast | Low | Normal | High | Ultra}]\n    [-CompressionMethod \u003cCompressionMethod\u003e {Copy | Deflate | Deflate64 | BZip2 | Lzma | Lzma2 | Ppmd | Default}]\n    [-Password \u003cstring\u003e] | [-SecurePassword \u003csecurestring\u003e]\n    [-EncryptionMethod \u003cZipEncryptionMethod\u003e {ZipCrypto | Aes128 | Aes192 | Aes256}]\n    [-CustomInitialization \u003cScriptBlock\u003e]\n    [-TempFolder \u003cstring\u003e]\n    [-IncludeHidden]\n    [-IncludeSystem\n    [-EncryptFilenames]\n    [-VolumeSize \u003cint\u003e]\n    [-FlattenDirectoryStructure]\n    [-SkipEmptyDirectories]\n    [-PreserveDirectoryRoot]\n    [-DisableRecursion]\n    [-Append]\n    [\u003cCommonParameters\u003e]\n\nGet-7Zip\n    [-ArchiveFileName] \u003cstring[]\u003e\n    [-Password \u003cstring\u003e] | [-SecurePassword \u003csecurestring\u003e]\n    [\u003cCommonParameters\u003e]\n\nGet-7ZipInformation\n    [-ArchiveFileName] \u003cstring[]\u003e\n    [-Password \u003cstring\u003e] | [-SecurePassword \u003csecurestring\u003e]\n    [\u003cCommonParameters\u003e]\n```\n\nIt works with x86, x64, and ARM64 and uses [SevenZipSharp](https://github.com/squid-box/SevenZipSharp) as a wrapper around 7zip's API.\n\n[Jason Fossen](https://github.com/JasonFossen) wrote the article [PowerShell 7-Zip Module Versus Compress-Archive with Encryption](https://web.archive.org/web/20240224175744/https://www.sans.org/blog/powershell-7-zip-module-versus-compress-archive-with-encryption/) (original article no longer available, archived version linked)\nwhere he describes some usage scenarios with 7Zip4PowerShell.\n\n## Where to get it\n\n7Zip4Powershell is published at [PowerShell Gallery](https://www.powershellgallery.com/packages/7Zip4Powershell).\n\n\n[![https://www.powershellgallery.com/packages/7Zip4Powershell](https://img.shields.io/powershellgallery/v/7Zip4Powershell)](https://www.powershellgallery.com/packages/7Zip4Powershell)\n[![Build Status](https://github.com/thoemmi/7Zip4Powershell/actions/workflows/pr-build.yml/badge.svg)](https://github.com/thoemmi/7Zip4Powershell/actions/workflows/pr-build.yml)\n\n## Customization\n\n`Compress-7Zip` accepts a script block for customization. The script block gets passed the current\n`SevenZipCompressor` instance. E.g. you can set the multithread mode this way:\n\n```powershell\n$initScript = {\n    param ($compressor)\n    $compressor.CustomParameters.Add(\"mt\", \"off\")\n}\n\nCompress-7Zip -Path . -ArchiveFileName demo.7z -CustomInitialization $initScript\n```\n\nA list of all custom parameters can be found [here](https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm).\n\n## Changelog\n\n### [v2.8]\n\n* Adds ARM64 support (contributed by [@aberus](https://github.com/aberus) in [#96](https://github.com/thoemmi/7Zip4Powershell/pull/96))\n\n### [v2.7]\n\n* Updates of 7-Zip libraries to version 24.09 (contributed by [@kborowinski](https://github.com/kborowinski) in [#92](https://github.com/thoemmi/7Zip4Powershell/pull/92))\n\n### [v2.6]\n\n* Updates of 7-Zip libraries to version 24.08 (contributed by [@kborowinski](https://github.com/kborowinski) in [#91](https://github.com/thoemmi/7Zip4Powershell/pull/91))\n\n### [v2.5]\n\n* Workaround for NullReferenceException when extracting multiple 7zip archives simultaneously on PS 7.4.0 (contributed by [@kborowinski](https://github.com/kborowinski) in [#89](https://github.com/thoemmi/7Zip4Powershell/pull/89))\n* Adds new parameter `EncryptionMethod` to `Compress-7Zip`\n* Updates of 7-Zip libraries to version 24.06 (support for ZSTD decompression ) (contributed by [@kborowinski](https://github.com/kborowinski) in [#90](https://github.com/thoemmi/7Zip4Powershell/pull/90))\n* Updates Squid-Box.SevenZipSharp nuget package to version 1.6.2.24 (final release -the project has been archived) (contributed by [@kborowinski](https://github.com/kborowinski) in [#90](https://github.com/thoemmi/7Zip4Powershell/pull/90))\n* Adds support for Wim (contributed by [@pysj](https://github.com/pysj) in [#87](https://github.com/thoemmi/7Zip4Powershell/pull/87))\n\n### [v2.4](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v2.4)\n\n* Updates 7-Zip libraries to 23.01 (contributed by [@kborowinski](https://github.com/kborowinski) in [#85](https://github.com/thoemmi/7Zip4Powershell/pull/85))\n\n### [v2.3](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v2.3)\n\n* Updates 7-Zip libraries to 22.01 and NuGet packages (contributed by [@kborowinski](https://github.com/kborowinski) in [#84](https://github.com/thoemmi/7Zip4Powershell/pull/84))\n* Adds `TempFolder` parameter to `Compress-7Zip` (requested in [#78](https://github.com/thoemmi/7Zip4Powershell/issues/78))\n\n### [v2.2](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v2.2)\n\n* Updates 7-Zip libraries to 22.00 (contributed by [@kborowinski](https://github.com/kborowinski) in [#80](https://github.com/thoemmi/7Zip4Powershell/pull/80))\n* Fixes broken link in readme (contributed by [@Mike-Crowley](https://github.com/Mike-Crowley) in [#77](https://github.com/thoemmi/7Zip4Powershell/pull/77))\n\n### [v2.1](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v2.1)\n\n* Updates 7-Zip libraries to 21.07 (contributed by [@kborowinski](https://github.com/kborowinski) in [#75](https://github.com/thoemmi/7Zip4Powershell/pull/75))\n\n### [v2.0](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v2.0)\n\n* Now based on .NET Standard 2.0 (thanks to [@kborowinski](https://github.com/kborowinski) for testing)\n\n### [v1.13](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.13)\n\n* Improved handling of paths in `ArchiveFileName`\n  ([#63](https://github.com/thoemmi/7Zip4Powershell/pull/63) and [#65](https://github.com/thoemmi/7Zip4Powershell/pull/65), contributed by [@iRebbok](https://github.com/iRebbok))\n* Updated readme\n  ([#64](https://github.com/thoemmi/7Zip4Powershell/pull/64), contributed by [@kborowinski](https://github.com/kborowinski))\n\n### [v1.12](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.12)\n\n* Uses PowerShell 5 reference assembly, which reduces the package size dramatically\n  ([#61](https://github.com/thoemmi/7Zip4Powershell/pull/61), contributed by [@kborowinski](https://github.com/kborowinski))\n\n### [v1.11](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.11)\n\n* Replaces *SevenZipSharp.Net45* with *Squid-Box.SevenZipSharp* library and adds new parameter `PreserveDirectoryRoot` for `Compress-7zip`.\n  ([#57](https://github.com/thoemmi/7Zip4Powershell/pull/57), contributed by [@kborowinski](https://github.com/kborowinski))\n* Adds new parameter `OutputPath` for `Compress-7Zip`\n  ([#60](https://github.com/thoemmi/7Zip4Powershell/pull/60), contributed by [@iRebbok](https://github.com/iRebbok))\n\n### [v1.10](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.10)\n\n* Updated 7-Zip dlls to 19.00 ([#56](https://github.com/thoemmi/7Zip4Powershell/pull/56), contributed by [@kborowinski](https://github.com/kborowinski))\n\n### [v1.9](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.9)\n\n* Updated 7-Zip dlls to 16.04\n* Disabled the `CustomInitialization` parameter for `Expand-7Zip`, will be removed in future versions.\n\n### [v1.8](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.8)\n\nJanuary 25, 2017\n\n* Added optional `SecurePassword` parameter of type `SecureString` to all cmdlets. (#34, #36)\n\n### [v1.7.1](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.7.1)\n\nOctober 27, 2016\n\n* Compression with password encryption could cause an exception (#33)\n\n### [v1.7](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.7)\n\nOctober 16, 2016\n\n* If `Format` is not specified, it is inferred from the file extension of `ArchiveFileName` (#24, proposed by @onyxhat)\n* Added new parameter `VolumeSize` to specify the colume size for `Compress-7Zip` (#25, proposed by @rgel)\n* Added new switches `FlattenDirectoryStructure`, `SkipEmptyDirectories`, and `DisableRecursion` to `Compress-7Zip` (#27, contributed by @itmagination)\n* Added new switch `Append` to `Compress-7Zip` to append files to an existing archive (#30, inspired by @itmagination)\n\n### [v1.6](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.6)\n\nJune 15, 2016\n\n* added `Get-7ZipInformation` cmdlet\n* use default compression method in `Compress-7Zip` (previously it was PPMd, for whatever reason) (#11)\n* allow piped input for `Get-7Zip` (#15)\n* use `WriteDebug` instead of `Write` of logging (#13)\n\n### [v1.5](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.5)\n\nJune 5, 2016\n\n* Added parameter `-EncryptFilenames` to `Compress-7Zip` (#10, requested by @JasonFossen)\n\n### [v1.4](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.4)\n\nMay 29, 2016\n\n* Added `Get-7Zip` to get a list of files in an archive (#9, contributed by @gigi81)\n\n### [v1.3](https://github.com/thoemmi/7Zip4Powershell/releases/tag/v1.3)\n\n30 March, 2016\n\n* Added `Password` parameter to both `Compress-7Zip` and `Expand-7Zip` (#8)\n\n## Motivation\n\nI've written and maintaining the module just for fun and to serve my own needs. If\nit's useful for you too, that's great. I don't demand anything in return.\n\nHowever, if you like this module and feel the urge to give something back, a coffee\nor a beer is always appreciated. Thank you very much in advance.\n\n[![PayPal.me](https://img.shields.io/badge/PayPal-me-blue.svg?maxAge=2592000)](https://www.paypal.me/ThomasFreudenberg)\n","funding_links":["https://www.paypal.me/ThomasFreudenberg"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoemmi%2F7zip4powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoemmi%2F7zip4powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoemmi%2F7zip4powershell/lists"}