Windows10利用PowerShell删除异常文件

Example 3: Delete hidden, read-only files

This command deletes a file that is bothhiddenandread-only.It uses thePathparameter to specify the file.It uses theForceparameter to delete it.WithoutForce, you cannot deleteread-onlyorhiddenfiles.

Remove-Item -Path C:\Test\hidden-RO-file.txt -Force


Remove-Item [-Path]

      [-Filter ]

      [-Include ]

      [-Exclude ]

      [-Recurse]

      [-Force]

      [-Credential ]

      [-WhatIf]

      [-Confirm]

      [-Stream ]

      []

https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.management/remove-item?view=powershell-6

你可能感兴趣的:(Windows10利用PowerShell删除异常文件)