From 4dde94681e49eab218fecc454fa3bdf5462a5e7e Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 1 Apr 2026 10:08:57 -0500 Subject: [PATCH 1/5] Update monthly stats (#12912) * Update monthly stats * Add missing rule link * Update 2026-updates.md --- .../docs-conceptual/community/2026-updates.md | 37 ++++++++++++++++++- .../docs-conceptual/community/hall-of-fame.md | 24 ++++++------ 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/reference/docs-conceptual/community/2026-updates.md b/reference/docs-conceptual/community/2026-updates.md index 414dc7322df..77870e74ff6 100644 --- a/reference/docs-conceptual/community/2026-updates.md +++ b/reference/docs-conceptual/community/2026-updates.md @@ -1,6 +1,6 @@ --- description: List of changes to the PowerShell documentation for 2026. -ms.date: 03/02/2026 +ms.date: 04/01/2026 title: What's New in PowerShell-Docs for 2026 --- # What's new in PowerShell Docs for 2026 @@ -15,6 +15,40 @@ get started. [01]: contributing/overview.md +## 2026-March + +New and updated content + +- Updated release notes for PowerShell 7.6.0 GA release +- Major rework of setup articles to simplify the structure + - Moved Homebrew installation instructions for macOS to [Alternate ways to install PowerShell](/powershell/scripting/install/alternate-install-methods) +- Updated PSScriptAnalyzer docs for v1.25 release including 6 new or updated rules + - [AlignAssignmentStatement](/powershell/utility-modules/psscriptanalyzer/rules/alignassignmentstatement) + - [AvoidLongLines](/powershell/utility-modules/psscriptanalyzer/rules/avoidlonglines) + - [UseConsistentParameterSetName](/powershell/utility-modules/psscriptanalyzer/rules/useconsistentparametersetname) + - [UseConsistentParametersKind](/powershell/utility-modules/psscriptanalyzer/rules/useconsistentparameterskind) + - [UseConstrainedLanguageMode](/powershell/utility-modules/psscriptanalyzer/rules/useconstrainedlanguagemode) + - [UseSingleValueFromPipelineParameter](/powershell/utility-modules/psscriptanalyzer/rules/usesinglevaluefrompipelineparameter) + +GitHub stats + +- 40 PRs merged (3 from Community) +- 56 issues opened (18 from Community, 33 Spam) +- 47 issues closed (12 from Community, 33 Spam) + +Top Community Contributors + +The following people contributed to PowerShell docs this month by submitting pull requests or +filing issues. Thank you! + +| GitHub Id | PRs merged | Issues opened | +| ---------------- | :--------: | :-----------: | +| baardhermansen | 1 | | +| derkallevombau | 1 | | +| dodexahedron | 1 | | +| SufficientDaikon | | 3 | +| kilasuit | | 2 | + ## 2026-February New and updated content @@ -22,7 +56,6 @@ New and updated content - Update PSResourceGet release notes for RC3 - Other general maintenance updates - GitHub stats - 20 PRs merged (4 from Community) diff --git a/reference/docs-conceptual/community/hall-of-fame.md b/reference/docs-conceptual/community/hall-of-fame.md index db4df24136b..e8e3ae71f7d 100644 --- a/reference/docs-conceptual/community/hall-of-fame.md +++ b/reference/docs-conceptual/community/hall-of-fame.md @@ -1,6 +1,6 @@ --- description: List of the GitHub users that have the most contributions to PowerShell documentation. -ms.date: 03/02/2026 +ms.date: 04/01/2026 title: Community contributor Hall of Fame --- # Community Contributor Hall of Fame @@ -9,7 +9,8 @@ The PowerShell Community is a vibrant and collaborative group. We greatly apprec and support we get from the community. You can be a contributor too. To learn how, read our [Contributor's Guide](contributing/overview.md). -These GitHub users are the All-Time Top Community Contributors. +These GitHub users are the All-Time Top Community Contributors. These tables list the top +contributors and the total contributions from the community for each year. ## Pull Requests merged @@ -17,7 +18,7 @@ Pull Requests help us fix those issues and make the documentation better for eve | PRs Merged | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Total | | ------------------ | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ----: | -| Community | 3 | 194 | 446 | 455 | 321 | 160 | 99 | 134 | 118 | 95 | 163 | 11 | 2199 | +| Community Total | 8 | 189 | 452 | 468 | 321 | 165 | 101 | 134 | 117 | 95 | 160 | 13 | 2223 | | matt9ucci | | | 157 | 80 | 30 | 1 | 6 | | | | | | 274 | | nschonni | | | | 14 | 138 | 10 | | | | | | | 162 | | kiazhi | | 25 | 79 | 12 | | | | | | | | | 116 | @@ -39,9 +40,8 @@ Pull Requests help us fix those issues and make the documentation better for eve | purdo17 | | | | 13 | | | | | | | | | 13 | | bergmeister | | | 1 | 3 | 3 | 1 | 1 | 2 | 1 | 1 | | | 13 | | markekraus | | | 11 | 1 | | | | | | | | | 12 | -| PlagueHO | | 10 | | | 1 | | | | | | | | 11 | -| hrxn | | | | | | | 2 | 2 | 2 | 5 | | | 11 | | exchange12rocks | | | 7 | 3 | | | 1 | | | | | | 11 | +| hrxn | | | | | | | 2 | 2 | 2 | 5 | | | 11 | ## GitHub issues opened @@ -49,32 +49,32 @@ GitHub issues help us identify errors and gaps in our documentation. | Issues Opened | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Total | | ------------------ | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ----: | -| Community | 3 | 54 | 95 | 210 | 556 | 553 | 366 | 237 | 291 | 244 | 183 | 30 | 2822 | +| Community Total | 6 | 52 | 96 | 213 | 567 | 564 | 367 | 244 | 291 | 243 | 183 | 48 | 2874 | | mklement0 | | | 19 | 60 | 56 | 61 | 28 | 8 | 20 | 24 | 2 | | 278 | | ehmiiz | | | | | | | | 21 | 14 | | | | 35 | | iRon7 | | | | | | 2 | 2 | 2 | 10 | 8 | 8 | | 32 | | iSazonov | | | 1 | 4 | 10 | 8 | 4 | 3 | | 1 | | | 31 | | jszabo98 | | | | 2 | 15 | 6 | 1 | | 1 | 2 | | 1 | 28 | | surfingoldelephant | | | | | | | | | | 6 | 19 | 2 | 27 | +| kilasuit | | | | | 3 | 2 | 1 | 4 | 1 | 4 | 5 | 3 | 23 | | juvtib | | | | | | 15 | 7 | | | | | | 22 | | peetrike | | | | 1 | | 4 | 2 | 6 | 4 | 3 | 1 | | 21 | -| kilasuit | | | | | 3 | 2 | 1 | 4 | 1 | 4 | 5 | 1 | 21 | | doctordns | | | 5 | 3 | 5 | 7 | 1 | | | | | | 21 | | JustinGrote | | | | 1 | 3 | 6 | 1 | 1 | 3 | 2 | 3 | | 20 | | vexx32 | | | | 3 | 11 | | | 3 | | | | | 17 | +| rkeithhill | | | 1 | 2 | 2 | 2 | 3 | 1 | 2 | | 1 | 1 | 15 | | KirkMunro | | | | 7 | 7 | 1 | | | | | | | 15 | | alexandair | | 9 | 4 | 2 | | | | | | | | | 15 | -| rkeithhill | | | 1 | 2 | 2 | 2 | 3 | 1 | 2 | | 1 | | 14 | | clamb123 | | | | | | | 14 | | | | | | 14 | | tabad | | | | | | | | | 11 | 2 | | | 13 | -| trollyanov | | | | | | | 11 | 1 | | | | | 12 | | ThomasNieto | | | | | | 3 | | 2 | 4 | 3 | | | 12 | -| Liturgist | | | | | 1 | 1 | 1 | 2 | 5 | 2 | | | 12 | +| trollyanov | | | | | | | 11 | 1 | | | | | 12 | | LaurentDardenne | | | 3 | 2 | | | | 5 | 2 | | | | 12 | +| Liturgist | | | | | 1 | 1 | 1 | 2 | 5 | 2 | | | 12 | | jsilverm | | | | | | 8 | | | 4 | | | | 12 | | CarloToso | | | | | | | | | 11 | | | | 11 | -| UberKluger | | | | | | 1 | 7 | 2 | | | | | 10 | | vors | 1 | 6 | 2 | 1 | | | | | | | | | 10 | -| o-l-a-v | | | | | 1 | | 1 | | 4 | 2 | 2 | | 10 | +| UberKluger | | | | | | 1 | 7 | 2 | | | | | 10 | | matt9ucci | | | 2 | 5 | | | 2 | | 1 | | | | 10 | +| o-l-a-v | | | | | 1 | | 1 | | 4 | 2 | 2 | | 10 | | ArmaanMcleod | | | | | | | | | 4 | 6 | | | 10 | From ae01078639581aa0384f1b27ae665a9c9f72f5e4 Mon Sep 17 00:00:00 2001 From: "Mikey Lombardi (He/Him)" Date: Wed, 1 Apr 2026 13:47:16 -0500 Subject: [PATCH 2/5] (AB-538621) Extend `Write-Host` note for non-primitive types (#12913) --- .../Write-Host.md | 28 ++++++++++++++++--- .../Write-Host.md | 26 +++++++++++++++-- .../Write-Host.md | 28 ++++++++++++++++--- .../Write-Host.md | 28 ++++++++++++++++--- 4 files changed, 95 insertions(+), 15 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md b/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md index 2e1c1e62daf..d2f9f8fd17c 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 09/26/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Write-Host @@ -35,7 +35,7 @@ a string to use to separate displayed objects. The particular result depends on hosting PowerShell. > [!NOTE] -> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information` This allows +> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information`. This allows > you to use `Write-Host` to emit output to the information stream. This enables the **capture** or > **suppression** of data written using `Write-Host` while preserving backwards compatibility. > @@ -261,8 +261,28 @@ cmdlet sends to it. separated by a single space. This can be overridden with the **Separator** parameter. - Non-primitive data types such as objects with properties can cause unexpected results and not - provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print - `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host. + provide meaningful output. For example, `@{a = 1; b = 2} | Write-Host` will print + `System.Collections.Hashtable` to the host. + + To work around this issue, you can manually create the string format you need with either string + interpolation or the format operator (`-f`). You can also pass the object to the + [Out-String](Out-String.md) command before passing it to `Write-Host`. The following snippet + shows examples of each approach: + + ```powershell + $ht = @{a = 1; b = 2} + # String interpolation + $ht.Keys.ForEach({ "[$_, $($ht[$_])]" }) -join ' ' | Write-Host + # Format operator + "[{0}, {1}] [{2}, {3}]" -f @('a', $ht.a, 'b', $ht.b) | Write-Host + # Out-String + $ht | Out-String | Write-Host -NoNewline + ``` + + For more information about string interpolation, see the article + [Everything you wanted to know about variable substitution in strings](/powershell/scripting/learn/deep-dives/everything-about-string-substitutions). + For more information about the format operator, see + [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#format-operator--f). ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md b/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md index 8c755eef95d..8e377e5f2d4 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 09/26/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Write-Host @@ -261,8 +261,28 @@ cmdlet sends to it. separated by a single space. This can be overridden with the **Separator** parameter. - Non-primitive data types such as objects with properties can cause unexpected results and not - provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print - `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host. + provide meaningful output. For example, `@{a = 1; b = 2} | Write-Host` will print + `System.Collections.Hashtable` to the host. + + To work around this issue, you can manually create the string format you need with either string + interpolation or the format operator (`-f`). You can also pass the object to the + [Out-String](Out-String.md) command before passing it to `Write-Host`. The following snippet + shows examples of each approach: + + ```powershell + $ht = @{a = 1; b = 2} + # String interpolation + $ht.Keys.ForEach({ "[$_, $($ht[$_])]" }) -join ' ' | Write-Host + # Format operator + "[{0}, {1}] [{2}, {3}]" -f @('a', $ht.a, 'b', $ht.b) | Write-Host + # Out-String + $ht | Out-String | Write-Host -NoNewline + ``` + + For more information about string interpolation, see the article + [Everything you wanted to know about variable substitution in strings](/powershell/scripting/learn/deep-dives/everything-about-string-substitutions). + For more information about the format operator, see + [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#format-operator--f). ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md b/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md index 243e0bb4288..f72264c741f 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 09/26/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Write-Host @@ -35,7 +35,7 @@ a string to use to separate displayed objects. The particular result depends on hosting PowerShell. > [!NOTE] -> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information` This allows +> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information`. This allows > you to use `Write-Host` to emit output to the information stream. This enables the **capture** or > **suppression** of data written using `Write-Host` while preserving backwards compatibility. > @@ -261,8 +261,28 @@ cmdlet sends to it. separated by a single space. This can be overridden with the **Separator** parameter. - Non-primitive data types such as objects with properties can cause unexpected results and not - provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print - `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host. + provide meaningful output. For example, `@{a = 1; b = 2} | Write-Host` will print + `System.Collections.Hashtable` to the host. + + To work around this issue, you can manually create the string format you need with either string + interpolation or the format operator (`-f`). You can also pass the object to the + [Out-String](Out-String.md) command before passing it to `Write-Host`. The following snippet + shows examples of each approach: + + ```powershell + $ht = @{a = 1; b = 2} + # String interpolation + $ht.Keys.ForEach({ "[$_, $($ht[$_])]" }) -join ' ' | Write-Host + # Format operator + "[{0}, {1}] [{2}, {3}]" -f @('a', $ht.a, 'b', $ht.b) | Write-Host + # Out-String + $ht | Out-String | Write-Host -NoNewline + ``` + + For more information about string interpolation, see the article + [Everything you wanted to know about variable substitution in strings](/powershell/scripting/learn/deep-dives/everything-about-string-substitutions). + For more information about the format operator, see + [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#format-operator--f). ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md b/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md index a483c1b016b..c767ea99298 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 09/26/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Write-Host @@ -35,7 +35,7 @@ a string to use to separate displayed objects. The particular result depends on hosting PowerShell. > [!NOTE] -> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information` This allows +> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information`. This allows > you to use `Write-Host` to emit output to the information stream. This enables the **capture** or > **suppression** of data written using `Write-Host` while preserving backwards compatibility. > @@ -261,8 +261,28 @@ cmdlet sends to it. separated by a single space. This can be overridden with the **Separator** parameter. - Non-primitive data types such as objects with properties can cause unexpected results and not - provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print - `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host. + provide meaningful output. For example, `@{a = 1; b = 2} | Write-Host` will print + `System.Collections.Hashtable` to the host. + + To work around this issue, you can manually create the string format you need with either string + interpolation or the format operator (`-f`). You can also pass the object to the + [Out-String](Out-String.md) command before passing it to `Write-Host`. The following snippet + shows examples of each approach: + + ```powershell + $ht = @{a = 1; b = 2} + # String interpolation + $ht.Keys.ForEach({ "[$_, $($ht[$_])]" }) -join ' ' | Write-Host + # Format operator + "[{0}, {1}] [{2}, {3}]" -f @('a', $ht.a, 'b', $ht.b) | Write-Host + # Out-String + $ht | Out-String | Write-Host -NoNewline + ``` + + For more information about string interpolation, see the article + [Everything you wanted to know about variable substitution in strings](/powershell/scripting/learn/deep-dives/everything-about-string-substitutions). + For more information about the format operator, see + [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#format-operator--f). ## RELATED LINKS From 2ae099ffc17e37058f012b5cb2911056314cf9c0 Mon Sep 17 00:00:00 2001 From: "Mikey Lombardi (He/Him)" Date: Wed, 1 Apr 2026 13:50:22 -0500 Subject: [PATCH 3/5] (AB-538641) Clarify `Expand-Archive` only applies to zip files (#12916) --- .../Microsoft.PowerShell.Archive/Expand-Archive.md | 11 +++++++++-- .../Microsoft.PowerShell.Archive/Expand-Archive.md | 4 +++- .../Microsoft.PowerShell.Archive/Expand-Archive.md | 11 +++++++++-- .../Microsoft.PowerShell.Archive/Expand-Archive.md | 9 ++++++++- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md b/reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md index cb660e29469..55698e971fc 100644 --- a/reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md +++ b/reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Archive-help.xml Locale: en-US Module Name: Microsoft.PowerShell.Archive -ms.date: 10/06/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Expand-Archive @@ -11,7 +11,7 @@ title: Expand-Archive # Expand-Archive ## SYNOPSIS -Extracts files from a specified archive (zipped) file. +Extracts files from a specified ZIP archive file. ## SYNTAX @@ -35,6 +35,13 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage. +This cmdlet only works with zip archives, which typically have the file extension `.zip`. + +The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files. +The API limits the maximum file size to 2GB. The .NET API works with files that conform to the +official ZIP file format specification by PKWARE Inc. For more information, see +[System.IO.Compression.ZipArchive](xref:System.IO.Compression.ZipArchive). + ## EXAMPLES ### Example 1: Extract the contents of an archive diff --git a/reference/7.4/Microsoft.PowerShell.Archive/Expand-Archive.md b/reference/7.4/Microsoft.PowerShell.Archive/Expand-Archive.md index b69f364616b..86cc130ad8f 100644 --- a/reference/7.4/Microsoft.PowerShell.Archive/Expand-Archive.md +++ b/reference/7.4/Microsoft.PowerShell.Archive/Expand-Archive.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Archive-help.xml Locale: en-US Module Name: Microsoft.PowerShell.Archive -ms.date: 09/03/2024 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Expand-Archive @@ -35,6 +35,8 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage. +This cmdlet only works with zip archives, which typically have the file extension `.zip`. + The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files. The API limits the maximum file size to 2GB. The .NET API works with files that conform to the official ZIP file format specification by PKWARE Inc. For more information, see diff --git a/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md b/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md index 7b3e378f92f..afcc0142f85 100644 --- a/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md +++ b/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Archive-help.xml Locale: en-US Module Name: Microsoft.PowerShell.Archive -ms.date: 10/06/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Expand-Archive @@ -11,7 +11,7 @@ title: Expand-Archive # Expand-Archive ## SYNOPSIS -Extracts files from a specified archive (zipped) file. +Extracts files from a specified ZIP archive file. ## SYNTAX @@ -35,6 +35,13 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage. +This cmdlet only works with zip archives, which typically have the file extension `.zip`. + +The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files. +The API limits the maximum file size to 2GB. The .NET API works with files that conform to the +official ZIP file format specification by PKWARE Inc. For more information, see +[System.IO.Compression.ZipArchive](xref:System.IO.Compression.ZipArchive). + ## EXAMPLES ### Example 1: Extract the contents of an archive diff --git a/reference/7.6/Microsoft.PowerShell.Archive/Expand-Archive.md b/reference/7.6/Microsoft.PowerShell.Archive/Expand-Archive.md index b8475a35401..3812197d781 100644 --- a/reference/7.6/Microsoft.PowerShell.Archive/Expand-Archive.md +++ b/reference/7.6/Microsoft.PowerShell.Archive/Expand-Archive.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Archive-help.xml Locale: en-US Module Name: Microsoft.PowerShell.Archive -ms.date: 10/06/2023 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Expand-Archive @@ -35,6 +35,13 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage. +This cmdlet only works with zip archives, which typically have the file extension `.zip`. + +The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files. +The API limits the maximum file size to 2GB. The .NET API works with files that conform to the +official ZIP file format specification by PKWARE Inc. For more information, see +[System.IO.Compression.ZipArchive](xref:System.IO.Compression.ZipArchive). + ## EXAMPLES ### Example 1: Extract the contents of an archive From 5d9f2171933f22248f0543cb25f1c0c069a80749 Mon Sep 17 00:00:00 2001 From: "Mikey Lombardi (He/Him)" Date: Wed, 1 Apr 2026 13:51:32 -0500 Subject: [PATCH 4/5] (AB-538640) Clarify behavior of `Rename-Item` when new name item exists (#12915) --- .../5.1/Microsoft.PowerShell.Management/Rename-Item.md | 9 +++++++-- .../7.4/Microsoft.PowerShell.Management/Rename-Item.md | 9 +++++++-- .../7.5/Microsoft.PowerShell.Management/Rename-Item.md | 9 +++++++-- .../7.6/Microsoft.PowerShell.Management/Rename-Item.md | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md index 203561c775b..bb11359ad03 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/rename-item?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -40,6 +40,10 @@ content of the item being renamed. You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet. +You can't use `Rename-Item` to replace an existing item, such as renaming `log_new.txt` to +`log_current.txt` when `log_current.txt` already exists. To replace an existing item, use the +`Move-Item` cmdlet with the **Force** parameter. + ## EXAMPLES ### Example 1: Rename a file @@ -152,7 +156,8 @@ or read-only aliases or variables. The cmdlet can't change constant aliases or v Implementation varies from provider to provider. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). -Even using the **Force** parameter, the cmdlet can't override security restrictions. +Even using the **Force** parameter, the cmdlet can't override security restrictions or replace an +existing item at the destination name specified by **NewName**. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md index 4c337886339..c7893e00448 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -39,6 +39,10 @@ content of the item being renamed. You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet. +You can't use `Rename-Item` to replace an existing item, such as renaming `log_new.txt` to +`log_current.txt` when `log_current.txt` already exists. To replace an existing item, use the +`Move-Item` cmdlet with the **Force** parameter. + ## EXAMPLES ### Example 1: Rename a file @@ -151,7 +155,8 @@ or read-only aliases or variables. The cmdlet can't change constant aliases or v Implementation varies from provider to provider. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). -Even using the **Force** parameter, the cmdlet can't override security restrictions. +Even using the **Force** parameter, the cmdlet can't override security restrictions or replace an +existing item at the destination name specified by **NewName**. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md index 7feebaf8be1..8301804fcf0 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -39,6 +39,10 @@ content of the item being renamed. You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet. +You can't use `Rename-Item` to replace an existing item, such as renaming `log_new.txt` to +`log_current.txt` when `log_current.txt` already exists. To replace an existing item, use the +`Move-Item` cmdlet with the **Force** parameter. + ## EXAMPLES ### Example 1: Rename a file @@ -151,7 +155,8 @@ or read-only aliases or variables. The cmdlet can't change constant aliases or v Implementation varies from provider to provider. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). -Even using the **Force** parameter, the cmdlet can't override security restrictions. +Even using the **Force** parameter, the cmdlet can't override security restrictions or replace an +existing item at the destination name specified by **NewName**. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md index edb88048ed1..a74bf7f2c7a 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -39,6 +39,10 @@ content of the item being renamed. You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet. +You can't use `Rename-Item` to replace an existing item, such as renaming `log_new.txt` to +`log_current.txt` when `log_current.txt` already exists. To replace an existing item, use the +`Move-Item` cmdlet with the **Force** parameter. + ## EXAMPLES ### Example 1: Rename a file @@ -151,7 +155,8 @@ or read-only aliases or variables. The cmdlet can't change constant aliases or v Implementation varies from provider to provider. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). -Even using the **Force** parameter, the cmdlet can't override security restrictions. +Even using the **Force** parameter, the cmdlet can't override security restrictions or replace an +existing item at the destination name specified by **NewName**. ```yaml Type: System.Management.Automation.SwitchParameter From 40d69ff6c69a28e3fe331e9d2debe5e7ca765b87 Mon Sep 17 00:00:00 2001 From: "Mikey Lombardi (He/Him)" Date: Wed, 1 Apr 2026 14:06:50 -0500 Subject: [PATCH 5/5] (AB-538639) Add note for destination exists to `Move-Item` (#12914) * (AB-538639) Add note for destination exists to `Move-Item` * Apply suggestions from code review Co-authored-by: Sean Wheeler --------- Co-authored-by: Sean Wheeler --- .../5.1/Microsoft.PowerShell.Management/Move-Item.md | 7 ++++++- .../7.4/Microsoft.PowerShell.Management/Move-Item.md | 7 ++++++- .../7.5/Microsoft.PowerShell.Management/Move-Item.md | 7 ++++++- .../7.6/Microsoft.PowerShell.Management/Move-Item.md | 8 +++++++- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Management/Move-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Move-Item.md index 68263a10c5e..08744b18e9d 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Move-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 02/26/2024 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -44,6 +44,11 @@ For example, it can move a file or subdirectory from one directory to another or subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location. +If the specified destination path resolves to an existing non-container item, or you're moving and +the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the +**Force** parameter. When the destination is an existing container (such as a directory), the item +is moved into that container, if supported by the provider. + ## EXAMPLES ### Example 1: Move a file to another directory and rename it diff --git a/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md index f999cba5144..6e3225e7cd4 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 02/26/2024 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -44,6 +44,11 @@ For example, it can move a file or subdirectory from one directory to another or subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location. +If the specified destination path resolves to an existing non-container item, or you're moving and +the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the +**Force** parameter. When the destination is an existing container (such as a directory), the item +is moved into that container, if supported by the provider. + ## EXAMPLES ### Example 1: Move a file to another directory and rename it diff --git a/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md index b293f6c9b6e..06e53d5f78f 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 02/26/2024 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -44,6 +44,11 @@ For example, it can move a file or subdirectory from one directory to another or subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location. +If the specified destination path resolves to an existing non-container item, or you're moving and +the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the +**Force** parameter. When the destination is an existing container (such as a directory), the item +is moved into that container, if supported by the provider. + ## EXAMPLES ### Example 1: Move a file to another directory and rename it diff --git a/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md index a27fe5f2c33..51de86e9fa7 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 02/26/2024 +ms.date: 04/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -44,6 +44,12 @@ For example, it can move a file or subdirectory from one directory to another or subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location. +If the specified destination path resolves to an existing non-container item, or you're moving and +the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the +**Force** parameter. When the destination is an existing container (such as a directory), the item +is moved into that container, if supported by the provider. +provider. + ## EXAMPLES ### Example 1: Move a file to another directory and rename it