• Navigate to the List that you have to do the customization.
  • Select the Modify View Option and then select Modify in SharePoint Designer.
  • Select the Column that you need to add the context menu, then you will get a small > symbol indicating more options available.
  • Select the Check Box “Show List Item Menu”.
  • Save and now view the list from the browser.

Steps to enable Context Menu from the Schema.xml file?

  • Open the list as a template
  • Set “ListItemMenu” attribute for the required field to “TRUE”. (The modification should be done to the FieldRef that is in Default View of the list)

How to do this using Powershell - Check this link 

http://www.ilovesharepoint.com/2008/08/add-sharepoint-list-item-context-menu.html