Check out these scripts (arguments shown should work, so you know you're getting an answer):
Using Biomart's API:
ensg2entrezgene ENSG00000187961
enst2entrezgene <ENST#>
ensg2ncbiProt ENSG00000187961
refseq_dna2ensg NM_005371

Or this using NCIB's e-utils:
getGene NM_005371
(you'd have to make a local copy of the script and edit to extract other fields, parse XML output, etc.)