Remove folder recursive
28/04/2013 11:14
#Remove directory recursive, with read-only attributes
#Go through all files (not folders) and set read-only attribute to false
$void = Get-ChildItem -Path $Destination -Recurse | where { -not $_.PsIsContainer } | foreach { $_.IsReadOnly = $false}
#Remove all items then
$void = Remove-Item $Destination -Recurse -Confirm:$false