It wasn't entirely clear from your post, but let me guess: this was the US border agent, right? (Why are our people always such, uh, er, fusspots?)
I wonder if just putting the car in park would have satisfied him. I've never been asked to power a car off (electric or gas) at the US/Canada...