Windows10利用PowerShell删除异常文件

2019-03-19  本文已影响0人  0oSco0

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] <String[]>

      [-Filter <String>]

      [-Include <String[]>]

      [-Exclude <String[]>]

      [-Recurse]

      [-Force]

      [-Credential <PSCredential>]

      [-WhatIf]

      [-Confirm]

      [-Stream <String[]>]

      [<CommonParameters>]

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

上一篇 下一篇

猜你喜欢

热点阅读