Here is a PowerShell which will do that easily for you, Change the following details down in the script.
Open SharePoint 2010 Management Shell by going to Start >> All Programs >>SharePoint >>Microsoft SharePoint 2010 Products >> SharePoint 2010 Management Shell (Run as Administrator).
Run the following script.
- [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
- function AddAttachment($item, $filePath)
- {
- $bytes = [System.IO.File]::ReadAllBytes($filePath)
- $item.Attachments.Add([System.IO.Path]::GetFileName($filePath),$bytes)
- $item.Update()
- }
- $site = [Microsoft.SharePoint.SPSite]("Your site name")
- $web = $site.OpenWeb()
- $list = $web.Lists["Your List name"]
- $item = $list.GetItemById(Your Id)
- AddAttachment $item "Your Document Name"

Join the conversation! Your thoughts help the community grow.