Tag: list

  • Delete SharePoint list items from PowerShell

    Here the quick solution to clean up/delete SharePoint list items that save a days lot if cleanup required. Manual efforts would take a lot so prefer to go with scripts; # Enter the site URL instead http://sathiya.io $weburl = “http://sathiya.io” $site = new-object Microsoft.SharePoint.SPSite ($weburl) $web = $site.OpenWeb() Write-Host “The Web application is : “$web.Title…

  • 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 }