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