powershell delete file or directory code example
Example 1: powershell remove folder and contents
Remove-Item -LiteralPath "foldertodelete" -Force -Recurse
Example 2: how to delete a file using powershell
Remove-Item "path/filename.extension"
Remove-Item -LiteralPath "foldertodelete" -Force -Recurse
Remove-Item "path/filename.extension"