Tag: Powershell
Find and delete a file on ALL drives using powershell
by Brian on May.05, 2021, under Computer Stuff, Windows Info
In the example below, replace filename.txt with the file you’d like deleted. It will be removed from all drives.
get-psdrive -PSProvider filesystem | ForEach-Object { Get-Childitem -Path $_.Root -Filter filename.txt -recurse | Remove-Item -force}