-
PowerShell script to delete files from list and output list of deleted file
Delete files listed in CSV the PowerShell script will read and clean it up from physical location. $Termed_Users = “C:\Data\Termed_Users.csv” $Home_Folders = “X:” $UserList = Import-Csv $Termed_Users $UserList | ForEach-Object { $ID = $_.ID $User_Home = $Home_Folders + “\” + $_.ID Remove-Item -recurse -force $User_Home -erroraction silentlycontinue }