FreeKB - PowerShell Remove-Item command
PowerShell - Remove-Item command

This is the most basic form of the command to delete a directory using PowerShell.

Remove-Item "C:\Path\To\Directory"


Some directories contain subdirectories. The -Recurse option can be used to delete subdirectories.

Remove-Item -Recurse "C:\Path\To\Directory"


Some directories contain secured files or system files. The -Force option can be used to deleted secured and system files.

Remove-Item -Recurse -Force "C:\Path\To\Directory"


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter b8c38 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |