diff --git a/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md index 37c848c1d16a..95bd63405b58 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Remove-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/14/2023 +ms.date: 01/28/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -130,7 +130,18 @@ cmdlet interprets the subject of the search to be a file that has no child items fails. > [!NOTE] -> This behavior was fixed in Windows versions 1909 and up. +> Starting in Windows version 1909, specifying the file type in the **Path** parameter when using +> the **Recurse** parameter does recursively discover child items with the given file extension. +> +> In Windows version 1909 and later, the following statements will discover and remove the same +> files: +> +> ```powershell +> # Works in all versions of Windows: +> Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item +> # Only correctly finds and removes nested CSV files in Windows 1909 and later: +> Get-ChildItem -Path *.csv -Recurse | Remove-Item +> ``` ### Example 5: Delete subkeys recursively diff --git a/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md index 7c234dc2b079..81a2f4302450 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Remove-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/14/2023 +ms.date: 01/28/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -128,7 +128,18 @@ cmdlet interprets the subject of the search to be a file that has no child items fails. > [!NOTE] -> This behavior was fixed in Windows versions 1909 and up. +> Starting in Windows version 1909, specifying the file type in the **Path** parameter when using +> the **Recurse** parameter does recursively discover child items with the given file extension. +> +> In Windows version 1909 and later, the following statements will discover and remove the same +> files: +> +> ```powershell +> # Works in all versions of Windows: +> Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item +> # Only correctly finds and removes nested CSV files in Windows 1909 and later: +> Get-ChildItem -Path *.csv -Recurse | Remove-Item +> ``` ### Example 5: Delete subkeys recursively diff --git a/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md index 88f3cb7df400..9f460df0a757 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Remove-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/14/2023 +ms.date: 01/28/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -128,7 +128,18 @@ cmdlet interprets the subject of the search to be a file that has no child items fails. > [!NOTE] -> This behavior was fixed in Windows versions 1909 and up. +> Starting in Windows version 1909, specifying the file type in the **Path** parameter when using +> the **Recurse** parameter does recursively discover child items with the given file extension. +> +> In Windows version 1909 and later, the following statements will discover and remove the same +> files: +> +> ```powershell +> # Works in all versions of Windows: +> Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item +> # Only correctly finds and removes nested CSV files in Windows 1909 and later: +> Get-ChildItem -Path *.csv -Recurse | Remove-Item +> ``` ### Example 5: Delete subkeys recursively diff --git a/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md index 5aeacc12b179..6e233fd54a8c 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Remove-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/14/2023 +ms.date: 01/28/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -128,7 +128,18 @@ cmdlet interprets the subject of the search to be a file that has no child items fails. > [!NOTE] -> This behavior was fixed in Windows versions 1909 and up. +> Starting in Windows version 1909, specifying the file type in the **Path** parameter when using +> the **Recurse** parameter does recursively discover child items with the given file extension. +> +> In Windows version 1909 and later, the following statements will discover and remove the same +> files: +> +> ```powershell +> # Works in all versions of Windows: +> Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item +> # Only correctly finds and removes nested CSV files in Windows 1909 and later: +> Get-ChildItem -Path *.csv -Recurse | Remove-Item +> ``` ### Example 5: Delete subkeys recursively