Link to home
Create AccountLog in
Avatar of RayT
RayTFlag for United States of America

asked on

Force Deletion Using PowerShell

How do I delete a specific sub-folder in C:\Program Files (x86) using Windows PowerShell?  I want to delete the sub-folder and ALL of the child folders/files.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
The double quotes need to enclose the path:
remove-item 'c:\program files (x86)\whatever' -recurse -force

Open in new window

I've also changed to ticks to prevent PowerShell from trying to accidentally detect an expression in the string.
Avatar of RayT

ASKER

Thanks a lot!