remove dir windows powershell code example
Example 1: powershell remove folder and contents
Remove-Item -LiteralPath "foldertodelete" -Force -Recurse
Example 2: powershell delete folder
Remove-Item 'D:\temp\Test Folder1'
Remove-Item -LiteralPath "foldertodelete" -Force -Recurse
Remove-Item 'D:\temp\Test Folder1'