To make their offending worse, the pair continued to shine the laser at the helicopter as it orbited above them while an on-board computer tracked the house where they were.
"The consequences of your offending could have been catastrophic," Judge Nevin Dawson said.
"Not only for the crew of the helicopter ... but [also] the residents of the densely populated area [below]."
It was submitted by a defence lawyer that O'Hare-Knight and Spiers should face a lighter sentence because the potential for harm was less significant than if they shone the laser at a passenger jet because it carried more possible victims than a helicopter.
Judge Dawson said the argument was "a brand of logic I find difficult to follow and I do not accept".
"If there had been the loss of lives in this incident, families of victims would find no comfort in that reasoning," Judge Dawson said.
"The loss of lives is a tragedy to any concerned."
The pair were found guilty last year of causing unnecessary danger to an aircraft.
Spiers was sentenced to 140 hours' community service and O'Hare-Knight 160 hours.
Crown prosecutor Asishna Prasad said the pair took turns shining the laser into the cockpit, flashing it at the helicopter about six times for between five and 10 seconds each time.
The chopper crew directed a ground patrol to where the laser strikes were coming from.
Defence lawyer Scott Leith said Spiers was a "17-year-old school student acting under peer pressure in a party environment".
Mr Leith said his client had a clean record and he said the court should "consider this incident for what it was and not for what the Crown contends it could have been".
Judge Dawson said the sentence needed to deter others from the same offending.
The number of laser strikes has significantly increased in recent years, from 23 reported in 2007 to 100 reported in 2011.
"People need to get the message that this offending is not just a foolish prank," Judge Dawson said.
Judge Dawson said there had been a degree of premeditation, the actions were deliberate and persistent and there had been "little remorse" shown by the men.
Outside court, O'Hare-Knight faced the media but would not comment on the case or offer an apology for his offending.
His lawyer said: "It's been a long two years this journey. We're just pleased it's over. He doesn't have anything further to say."
Spiers would not answer questions from the media.
The New Zealand Air Line Pilots' Association said it supported the sentences.