Powershell BCS list call error: an error occurred while enumerating through a collection: the shim execution failed unexpectedly – proxy creation failed. default context not found

If you get the following error whilst making a call to an external list make sure that you instantiate a spservicecontext. Just add the lines below above your get-spweb.

# BEGIN: Get the SpServiceContext as a BCS call is being made
$context = Get-SPServiceContext “http://sharepoint/”;
$scope = New-Object microsoft.SharePoint.SPServiceContextScope $context ;
# END: Get the SpServiceContext as a BCS call is being made