You need the FileManager for that.
Try like this, it will delete the folder and all its content.
$file = '[MyDS] TestFolder'$dcName = 'MyDC'
$dc = Get-Datacenter -Name $dcName
$si = Get-View ServiceInstance
$fileMgr = Get-View -Id $si.Content.FileManager
$fileMgr.DeleteDatastoreFile($file, $dc.ExtensionData.MoRef)