Sort of works but for what ever reason it only works on the last hit …Lots of people use PS scripts with sdelete … I guess I could load up that binary into memory PS via encode but that seems overkill and may still get flagged as bad from Security software.
ref this takes to long and I dont need ‘secure’ delete just /dev/null to file and delete ( prevent most data recovery tools ) : https://gallery.technet.microsoft.com/scriptcenter/Secure-File-Remove-by-110adb68
[CmdletBinding()] Param (
[Parameter(Mandatory = $True, ValueFromPipeline = $True)] $Path )
$bytes = (Get-Item $Path).length
$myArray = ,0 * $bytes
#iex ‘echo A > c:\delete_OLD\txt.txt’
Get-ChildItem c:\delete_OLD\ -Force -Recurse -Include * -File | wow1