CmdID

CmdID / Commands

remove-item

Delete files, folders, as well as registry keys and subkeys. tldr-pages

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from tldr-pages, CC BY 4.0

Delete files, folders, as well as registry keys and subkeys. This command can only be run through PowerShell.

Remove specific files or registry keys (without subkeys)

Remove-Item path\to\file_or_key1 , path\to\file_or_key2 ...Identify

Remove hidden or read-only files

Remove-Item -Force path\to\file1 , path\to\file2 ...Identify

Remove specific files or registry keys interactively prompting before each removal

Remove-Item -Confirm path\to\file_or_key1 , path\to\file_or_key2 ...Identify

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 ...Identify

Remove specific Windows registry keys and all its subkeys

Remove-Item -Recurse path\to\key1 , path\to\key2 ...Identify

Simulate the deletion process

Remove-Item -WhatIf path\to\file1 , path\to\file2 ...Identify