SyntaxFix
Write A Post
Hire A Developer
Questions
To avoid the "The directory is not empty" errors of the accepted answer, simply use the good old DOS command as suggested before. The full PS syntax ready for copy-pasting is:
& cmd.exe /c rd /S /Q $folderToDelete