windows/*: add PowerShell commands and aliases (#11227)
* windows/*: add PowerShell commands and aliases * clear-host, new-item, remove-item: fix style * psversiontable, remove-item: fix style --------- Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
153b670288
commit
bcdc05b986
29
pages/windows/remove-item.md
Normal file
29
pages/windows/remove-item.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Remove-Item
|
||||
|
||||
> Delete files, folders, as well as registry keys and subkeys.
|
||||
> This command can only be run through PowerShell.
|
||||
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-item>.
|
||||
|
||||
- Remove specific files or registry keys (without subkeys):
|
||||
|
||||
`Remove-Item {{path\to\file_or_key1 path\to\file_or_key2 ...}}`
|
||||
|
||||
- Remove hidden or read-only files:
|
||||
|
||||
`Remove-Item -Force {{path\to\file1 path\to\file2 ...}}`
|
||||
|
||||
- Remove specific files or registry keys interactively prompting before each removal:
|
||||
|
||||
`Remove-Item -Confirm {{path\to\file_or_key1 path\to\file_or_key2 ...}}`
|
||||
|
||||
- Remove specific files and directories recursively (Windows 10 version 1909 or later):
|
||||
|
||||
`Remove-Item -Recurse {{path\to\file_or_directory1 path\to\file_or_directory2 ...}}`
|
||||
|
||||
- Remove specific Windows registry keys and all its subkeys:
|
||||
|
||||
`Remove-Item -Recurse {{path\to\key1 path\to\key2 ...}}`
|
||||
|
||||
- Perform a dry run of the deletion process:
|
||||
|
||||
`Remove-Item -WhatIf {{path\to\file1 path\to\file2 ...}}`
|
Reference in New Issue
Block a user