List all Attachment from a SharePoint List using Power-shell Script

Given below is the Powershell script that explains how we can get details of all the attachments of a SharePoint List.

$web = Get-SPWeb -Identity http://abhay-pc:9999

$list = $web.Lists["ResourceResume"]

foreach ($item in $list.Items)

{

$attachmentCollection = $item.Attachments

$folder = $web.GetFolder($attachmentCollection.UrlPrefix);

foreach ($file in $folder.Files)

{

Write-Host $item.Title

Write-Host $file.Name

Write-Host $file.Author

Write-Host $file.TimeCreated

}

}