The former head of the federal agency that protects government whistleblowers was sentenced Monday to two years of probation, including one day in jail, for having files erased from government computers.

U.S. District Judge Robert L. Wilkins reprimanded Scott J. Bloch, the Bush-era head of the Office of Special Counsel, for failing to “completely come clean” about why he had hired private technicians to scrub office computers and for misleading Congress when asked about his conduct.

“This depredation of property seemed to have gone beyond just the innocent explanation of there being a [computer] virus,” Wilkins said, adding that he had “no choice but to conclude that there is something more than what is represented to me.”

Bloch’s attorney, William M. Sullivan Jr., had requested a one-year period of probation, and federal prosecutors did not object. Outside the courtroom, Sullivan called the sentence a “tad too severe,” but both he and Bloch said they were relieved to put the lengthy legal ordeal behind them.

Bloch admitted in 2010 that he had not given congressional investigators complete information about the incident in which he hired a company called Geeks on Call to remove information from computers at the Office of Special Counsel. He was initially sentenced to 30 days in jail for the misdemeanor contempt of Congress charge. But a federal judge allowed him to withdraw his guilty plea because neither side in the case had been aware that the offense required a sentence of jail time.

Prosecutors then filed a new misdemeanor charge, and Bloch pleaded guilty in February to destroying government property.

In May, Wilkins delayed sentencing because he said attorneys on both sides had not given him sufficient information about Bloch’s conduct.

Bloch’s legal odyssey followed his controversial tenure at the top of a federal agency. At the time of the computer scrub in 2006, he was under investigation by the Office of Personnel Management’s inspector general. He had been accused of retaliating against his staff and closing whistleblower cases without proper investigation. The Geeks on Call visit was reported the next year by the Wall Street Journal, prompting an investigation by a House committee.

Bloch maintained that he was trying to deal with a computer virus. His lawyer said in court documents that the so-called seven-level wipe was not intended to interfere with the ongoing investigation. The wipe took place more than a year after the investigation had started, Sullivan said, and Bloch had already turned over agency documents requested by the inspector general.

Sullivan acknowledged in court Monday that Bloch was not “forthright and completely comprehensive with Congress,” but said that his answers were “technically accurate.”

He told Wilkins that Bloch was a “good man, who made a mistake” and urged the judge to consider Bloch’s history of volunteerism and his positive career.

Former employees of the Office of Special Counsel and whistleblower protection groups objected in court filings to a sentence of probation. Debra S. Katz, an attorney for the employees, whose complaint prompted the inspector general investigation, called the sentence a “slap on the wrist.”

“He was a presidential appointee who abused the public trust,” Katz said after the hearing.

While prosecutors said in court papers that “frustrations expressed by the whistle blower community are perhaps understandable, given their strong feelings regarding Mr. Bloch,” the government agreed with the legal analysis of Bloch’s attorney in determining the appropriate sentencing guidelines.

Assistant U.S. Attorney Deborah L. Connor and Justice Department trial attorney Glenn S. Leon concluded that Bloch’s statements to Congress did not add up to “sufficient evidence that Bloch intended to obstruct the investigation.”

Wilkins disagreed. The judge said he was troubled by Bloch’s answers to congressional investigators and considered his conduct relevant in determining a sentence.

“There was an attempt to obstruct justice and impede Congress from getting to the bottom,” Wilkins said.

He also ordered Bloch to pay a $5,000 fine and to perform 200 hours of community service.