To delete a file or Folder in Powershell you can use the following snippet.
if you want to delete a file use
remove-item -path "C:\Users\Codesnippets\Desktop\Test.xml" -force -recurse
if you want to delete a folder use
remove-item -path "C:\Users\Codesnippets\Desktop\Folder1" -force -recurse
for more informations see Using the Remove-Item Cmdlet