Tag : Remove-Item

This script will delte everyting in the “Script” folder, sub-folder, and the “-recurse” option will prevent the prompting of confirmation. The “-exclude” option alllows you to exclude files and folders. Remove-Item c:\scripts\* -recurse -exclude *.wav Alternative; $Path = ‘\\servername\folder’ Get-ChildItem -Path $Path -Recurse | Remove-Item -Force -Recurse More on the Remove-Item Powershell cmdlet can be ..

Read more