SharePoint Seek

Hey Seeker! Thank you for stopping by.

Wednesday, 25 July 2018

PowerShell: Delete Files Older than 30 Days


Get-ChildItem –Path "Enter path of the folder" -Recurse | Where-Object {($_.LastWriteTime -lt (Get-Date).AddDays(-30))} | Remove-Item


Posted by Aditya Chouhan at 04:41
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Useful blogs

  • ►  2017 (4)
    • ►  July (2)
    • ►  October (2)
  • ▼  2018 (16)
    • ►  May (1)
    • ▼  July (13)
      • SharePoint 2013: Get Usage of each site at webappl...
      • SharePoint 2013: Get the sites which are not modif...
      • SharePoint 2013: Get the Users Hits per Site using...
      • SharePoint 2013: Get the Orphaned Site Collection ...
      • Planning and Configuring Service Applications
      • SharePoint AnalyticsData
      • UserHits for Particular site
      • Site details
      • Recycle bin Script
      • SharePoint 2013: Get all the Last accessed sites
      • PowerShell: Delete Files Older than 30 Days
      • Batch Script: Delete files older than 30 days
      • How to Get the Last accessed Sites in SharePoint 2...
    • ►  August (1)
    • ►  December (1)
  • ►  2019 (1)
    • ►  August (1)
  • ►  2020 (1)
    • ►  April (1)
Watermark theme. Powered by Blogger.