PowerShell: Delete Directory

By Xah Lee. Date: .

Delete Directory

# delete a dir
rm .\dirName
# PowerShell may prompt to confirm
# delete a directory, force, no ask
rm .\dirName -Force -Recurse

If you cannot delete a dir because read only etc, see Get/Set File Attributes

PowerShell, Working with Directory

PowerShell How-To

Install and Help

list files

list dirs

on dir

on file

Windows config

zip tar