Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 24 additions & 4 deletions reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
>
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 23 additions & 3 deletions reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
11 changes: 9 additions & 2 deletions reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 24 additions & 4 deletions reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
>
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading