"There was apparently some damage and waste left in the women's toilets, which had to be cleaned up by a plumber," Judge Kevin Phillips said in the Dunedin District Court yesterday.
On examining the windows, Kelland's fingerprint was found on an interior frame, having been collected by police in connection with previous crimes.
Four months after the toilet break-in, Kelland climbed onto the roof of a Dunedin home and slipped inside.
The burglar spent nearly a week at the house before stealing a television.
He also made use of the bathroom facilities.
"You have a very bad history," the judge said.
Kelland had numerous burglary convictions, as well as convictions for an incident on Waiheke Island in 2013 in which he sexually attacked an English tourist.
Counsel Karlena Lawrence said her client wanted to engage in a course of therapy and undertake any courses that might be required.
The fact the defendant wanted to undergo rehabilitation "quite impressed" Judge Phillips.
"A lot of lads say 'oh, I've done the time, let me go'," he said, acknowledging Kelland had been in custody on remand since January.
"You want to get some assistance ... and I want to give that to you."
Kelland was sentenced to 12 months' intensive supervision.
He was also ordered to pay $500 for the television he stole, and $1000 for the cleaning fee of the KiwiRail toilets.