File tree Expand file tree Collapse file tree 4 files changed +52
-8
lines changed
5.1/Microsoft.PowerShell.Management
7.4/Microsoft.PowerShell.Management
7.5/Microsoft.PowerShell.Management
7.6/Microsoft.PowerShell.Management Expand file tree Collapse file tree 4 files changed +52
-8
lines changed Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Management.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Management
5- ms.date : 02/14/2023
5+ ms.date : 01/28/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-5.1&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -130,7 +130,18 @@ cmdlet interprets the subject of the search to be a file that has no child items
130130fails.
131131
132132> [ !NOTE]
133- > This behavior was fixed in Windows versions 1909 and up.
133+ > Starting in Windows version 1909, specifying the file type in the ** Path** parameter when using
134+ > the ** Recurse** parameter does recursively discover child items with the given file extension.
135+ >
136+ > In Windows version 1909 and later, the following statements will discover and remove the same
137+ > files:
138+ >
139+ > ``` powershell
140+ > # Works in all versions of Windows:
141+ > Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item
142+ > # Only correctly finds and removes nested CSV files in Windows 1909 and later:
143+ > Get-ChildItem -Path *.csv -Recurse | Remove-Item
144+ > ```
134145
135146### Example 5: Delete subkeys recursively
136147
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Management.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Management
5- ms.date : 02/14/2023
5+ ms.date : 01/28/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.4&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -128,7 +128,18 @@ cmdlet interprets the subject of the search to be a file that has no child items
128128fails.
129129
130130> [ !NOTE]
131- > This behavior was fixed in Windows versions 1909 and up.
131+ > Starting in Windows version 1909, specifying the file type in the ** Path** parameter when using
132+ > the ** Recurse** parameter does recursively discover child items with the given file extension.
133+ >
134+ > In Windows version 1909 and later, the following statements will discover and remove the same
135+ > files:
136+ >
137+ > ``` powershell
138+ > # Works in all versions of Windows:
139+ > Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item
140+ > # Only correctly finds and removes nested CSV files in Windows 1909 and later:
141+ > Get-ChildItem -Path *.csv -Recurse | Remove-Item
142+ > ```
132143
133144### Example 5: Delete subkeys recursively
134145
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Management.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Management
5- ms.date : 02/14/2023
5+ ms.date : 01/28/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.5&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -128,7 +128,18 @@ cmdlet interprets the subject of the search to be a file that has no child items
128128fails.
129129
130130> [ !NOTE]
131- > This behavior was fixed in Windows versions 1909 and up.
131+ > Starting in Windows version 1909, specifying the file type in the ** Path** parameter when using
132+ > the ** Recurse** parameter does recursively discover child items with the given file extension.
133+ >
134+ > In Windows version 1909 and later, the following statements will discover and remove the same
135+ > files:
136+ >
137+ > ``` powershell
138+ > # Works in all versions of Windows:
139+ > Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item
140+ > # Only correctly finds and removes nested CSV files in Windows 1909 and later:
141+ > Get-ChildItem -Path *.csv -Recurse | Remove-Item
142+ > ```
132143
133144### Example 5: Delete subkeys recursively
134145
Original file line number Diff line number Diff line change 22external help file : Microsoft.PowerShell.Commands.Management.dll-Help.xml
33Locale : en-US
44Module Name : Microsoft.PowerShell.Management
5- ms.date : 02/14/2023
5+ ms.date : 01/28/2026
66online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.6&WT.mc_id=ps-gethelp
77schema : 2.0.0
88aliases :
@@ -128,7 +128,18 @@ cmdlet interprets the subject of the search to be a file that has no child items
128128fails.
129129
130130> [ !NOTE]
131- > This behavior was fixed in Windows versions 1909 and up.
131+ > Starting in Windows version 1909, specifying the file type in the ** Path** parameter when using
132+ > the ** Recurse** parameter does recursively discover child items with the given file extension.
133+ >
134+ > In Windows version 1909 and later, the following statements will discover and remove the same
135+ > files:
136+ >
137+ > ``` powershell
138+ > # Works in all versions of Windows:
139+ > Get-ChildItem -Path * -Include *.csv -Recurse | Remove-Item
140+ > # Only correctly finds and removes nested CSV files in Windows 1909 and later:
141+ > Get-ChildItem -Path *.csv -Recurse | Remove-Item
142+ > ```
132143
133144### Example 5: Delete subkeys recursively
134145
You can’t perform that action at this time.
0 commit comments