79238312

Date: 2024-11-29 20:46:01
Score: 1
Natty:
Report link

To remove using "Remove-Item", specify the path using "device paths", "\\?\" or "\\.\".

To remove the entire directory:

Remove-Item -Path "\\?\C:\Windows\SoftwareDistribution\Download\"

To remove only the subdirectories and keep the parent directory:

Remove-Item -Path "\\?\C:\Windows\SoftwareDistribution\Download\*"

The "\\?\" is supported in all versions of .NET Core and .NET 5+ and in .NET Framework starting with version 4.6.2.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: andreyoliveira