Skip to content

Commit 53aca2d

Browse files
Merge pull request #12917 from MicrosoftDocs/main
Auto Publish – main to live - 2026-04-01 22:00 UTC
2 parents 3ea97b5 + 40d69ff commit 53aca2d

File tree

18 files changed

+224
-47
lines changed

18 files changed

+224
-47
lines changed

reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Archive-help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Archive
5-
ms.date: 10/06/2023
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Expand-Archive
@@ -11,7 +11,7 @@ title: Expand-Archive
1111
# Expand-Archive
1212

1313
## SYNOPSIS
14-
Extracts files from a specified archive (zipped) file.
14+
Extracts files from a specified ZIP archive file.
1515

1616
## SYNTAX
1717

@@ -35,6 +35,13 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file
3535
destination folder. An archive file allows multiple files to be packaged, and optionally compressed,
3636
into a single zipped file for easier distribution and storage.
3737

38+
This cmdlet only works with zip archives, which typically have the file extension `.zip`.
39+
40+
The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files.
41+
The API limits the maximum file size to 2GB. The .NET API works with files that conform to the
42+
official ZIP file format specification by PKWARE Inc. For more information, see
43+
[System.IO.Compression.ZipArchive](xref:System.IO.Compression.ZipArchive).
44+
3845
## EXAMPLES
3946

4047
### Example 1: Extract the contents of an archive

reference/5.1/Microsoft.PowerShell.Management/Move-Item.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 02/26/2024
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -44,6 +44,11 @@ For example, it can move a file or subdirectory from one directory to another or
4444
subkey from one key to another. When you move an item, it is added to the new location and deleted
4545
from its original location.
4646

47+
If the specified destination path resolves to an existing non-container item, or you're moving and
48+
the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the
49+
**Force** parameter. When the destination is an existing container (such as a directory), the item
50+
is moved into that container, if supported by the provider.
51+
4752
## EXAMPLES
4853

4954
### Example 1: Move a file to another directory and rename it

reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 01/18/2026
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/rename-item?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -40,6 +40,10 @@ content of the item being renamed.
4040
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new
4141
name. To move and rename an item, use the `Move-Item` cmdlet.
4242

43+
You can't use `Rename-Item` to replace an existing item, such as renaming `log_new.txt` to
44+
`log_current.txt` when `log_current.txt` already exists. To replace an existing item, use the
45+
`Move-Item` cmdlet with the **Force** parameter.
46+
4347
## EXAMPLES
4448

4549
### Example 1: Rename a file
@@ -152,7 +156,8 @@ or read-only aliases or variables. The cmdlet can't change constant aliases or v
152156
Implementation varies from provider to provider. For more information, see
153157
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
154158
155-
Even using the **Force** parameter, the cmdlet can't override security restrictions.
159+
Even using the **Force** parameter, the cmdlet can't override security restrictions or replace an
160+
existing item at the destination name specified by **NewName**.
156161
157162
```yaml
158163
Type: System.Management.Automation.SwitchParameter

reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 09/26/2023
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Write-Host
@@ -35,7 +35,7 @@ a string to use to separate displayed objects. The particular result depends on
3535
hosting PowerShell.
3636

3737
> [!NOTE]
38-
> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information` This allows
38+
> Starting in Windows PowerShell 5.0, `Write-Host` is a wrapper for `Write-Information`. This allows
3939
> you to use `Write-Host` to emit output to the information stream. This enables the **capture** or
4040
> **suppression** of data written using `Write-Host` while preserving backwards compatibility.
4141
>
@@ -261,8 +261,28 @@ cmdlet sends to it.
261261
separated by a single space. This can be overridden with the **Separator** parameter.
262262

263263
- Non-primitive data types such as objects with properties can cause unexpected results and not
264-
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print
265-
`System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
264+
provide meaningful output. For example, `@{a = 1; b = 2} | Write-Host` will print
265+
`System.Collections.Hashtable` to the host.
266+
267+
To work around this issue, you can manually create the string format you need with either string
268+
interpolation or the format operator (`-f`). You can also pass the object to the
269+
[Out-String](Out-String.md) command before passing it to `Write-Host`. The following snippet
270+
shows examples of each approach:
271+
272+
```powershell
273+
$ht = @{a = 1; b = 2}
274+
# String interpolation
275+
$ht.Keys.ForEach({ "[$_, $($ht[$_])]" }) -join ' ' | Write-Host
276+
# Format operator
277+
"[{0}, {1}] [{2}, {3}]" -f @('a', $ht.a, 'b', $ht.b) | Write-Host
278+
# Out-String
279+
$ht | Out-String | Write-Host -NoNewline
280+
```
281+
282+
For more information about string interpolation, see the article
283+
[Everything you wanted to know about variable substitution in strings](/powershell/scripting/learn/deep-dives/everything-about-string-substitutions).
284+
For more information about the format operator, see
285+
[about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#format-operator--f).
266286

267287
## RELATED LINKS
268288

reference/7.4/Microsoft.PowerShell.Archive/Expand-Archive.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Archive-help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Archive
5-
ms.date: 09/03/2024
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Expand-Archive
@@ -35,6 +35,8 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file
3535
destination folder. An archive file allows multiple files to be packaged, and optionally compressed,
3636
into a single zipped file for easier distribution and storage.
3737

38+
This cmdlet only works with zip archives, which typically have the file extension `.zip`.
39+
3840
The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files.
3941
The API limits the maximum file size to 2GB. The .NET API works with files that conform to the
4042
official ZIP file format specification by PKWARE Inc. For more information, see

reference/7.4/Microsoft.PowerShell.Management/Move-Item.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 02/26/2024
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -44,6 +44,11 @@ For example, it can move a file or subdirectory from one directory to another or
4444
subkey from one key to another. When you move an item, it is added to the new location and deleted
4545
from its original location.
4646

47+
If the specified destination path resolves to an existing non-container item, or you're moving and
48+
the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the
49+
**Force** parameter. When the destination is an existing container (such as a directory), the item
50+
is moved into that container, if supported by the provider.
51+
4752
## EXAMPLES
4853

4954
### Example 1: Move a file to another directory and rename it

reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 01/18/2026
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -39,6 +39,10 @@ content of the item being renamed.
3939
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new
4040
name. To move and rename an item, use the `Move-Item` cmdlet.
4141

42+
You can't use `Rename-Item` to replace an existing item, such as renaming `log_new.txt` to
43+
`log_current.txt` when `log_current.txt` already exists. To replace an existing item, use the
44+
`Move-Item` cmdlet with the **Force** parameter.
45+
4246
## EXAMPLES
4347

4448
### Example 1: Rename a file
@@ -151,7 +155,8 @@ or read-only aliases or variables. The cmdlet can't change constant aliases or v
151155
Implementation varies from provider to provider. For more information, see
152156
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
153157
154-
Even using the **Force** parameter, the cmdlet can't override security restrictions.
158+
Even using the **Force** parameter, the cmdlet can't override security restrictions or replace an
159+
existing item at the destination name specified by **NewName**.
155160
156161
```yaml
157162
Type: System.Management.Automation.SwitchParameter

reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 09/26/2023
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-host?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Write-Host
@@ -261,8 +261,28 @@ cmdlet sends to it.
261261
separated by a single space. This can be overridden with the **Separator** parameter.
262262

263263
- Non-primitive data types such as objects with properties can cause unexpected results and not
264-
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print
265-
`System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
264+
provide meaningful output. For example, `@{a = 1; b = 2} | Write-Host` will print
265+
`System.Collections.Hashtable` to the host.
266+
267+
To work around this issue, you can manually create the string format you need with either string
268+
interpolation or the format operator (`-f`). You can also pass the object to the
269+
[Out-String](Out-String.md) command before passing it to `Write-Host`. The following snippet
270+
shows examples of each approach:
271+
272+
```powershell
273+
$ht = @{a = 1; b = 2}
274+
# String interpolation
275+
$ht.Keys.ForEach({ "[$_, $($ht[$_])]" }) -join ' ' | Write-Host
276+
# Format operator
277+
"[{0}, {1}] [{2}, {3}]" -f @('a', $ht.a, 'b', $ht.b) | Write-Host
278+
# Out-String
279+
$ht | Out-String | Write-Host -NoNewline
280+
```
281+
282+
For more information about string interpolation, see the article
283+
[Everything you wanted to know about variable substitution in strings](/powershell/scripting/learn/deep-dives/everything-about-string-substitutions).
284+
For more information about the format operator, see
285+
[about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#format-operator--f).
266286

267287
## RELATED LINKS
268288

reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Archive-help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Archive
5-
ms.date: 10/06/2023
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Expand-Archive
@@ -11,7 +11,7 @@ title: Expand-Archive
1111
# Expand-Archive
1212

1313
## SYNOPSIS
14-
Extracts files from a specified archive (zipped) file.
14+
Extracts files from a specified ZIP archive file.
1515

1616
## SYNTAX
1717

@@ -35,6 +35,13 @@ The `Expand-Archive` cmdlet extracts files from a specified zipped archive file
3535
destination folder. An archive file allows multiple files to be packaged, and optionally compressed,
3636
into a single zipped file for easier distribution and storage.
3737

38+
This cmdlet only works with zip archives, which typically have the file extension `.zip`.
39+
40+
The `Expand-Archive` cmdlet uses the **System.IO.Compression.ZipArchive** API to compress files.
41+
The API limits the maximum file size to 2GB. The .NET API works with files that conform to the
42+
official ZIP file format specification by PKWARE Inc. For more information, see
43+
[System.IO.Compression.ZipArchive](xref:System.IO.Compression.ZipArchive).
44+
3845
## EXAMPLES
3946

4047
### Example 1: Extract the contents of an archive

reference/7.5/Microsoft.PowerShell.Management/Move-Item.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 02/26/2024
5+
ms.date: 04/01/2026
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/move-item?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -44,6 +44,11 @@ For example, it can move a file or subdirectory from one directory to another or
4444
subkey from one key to another. When you move an item, it is added to the new location and deleted
4545
from its original location.
4646

47+
If the specified destination path resolves to an existing non-container item, or you're moving and
48+
the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the
49+
**Force** parameter. When the destination is an existing container (such as a directory), the item
50+
is moved into that container, if supported by the provider.
51+
4752
## EXAMPLES
4853

4954
### Example 1: Move a file to another directory and rename it

0 commit comments

Comments
 (0)