The gang were caught dismantling steel beams from the dilapidated barn unaware that they were breathing in potentially deadly asbestos from the roof.
Sheriff Kenneth McGowan told ringleader Steven Cameron at Perth Sheriff Court on Thursday: "This was not exactly the crime of the century.
"It seems inevitable you were going to be caught, if not red-handed, then immediately afterwards. What's more worrying is that you have found yourself in a situation where you damaged a building and it would cost £80,000 pounds to repair.
"Even more significant than that is that you have undoubtedly exposed yourself to asbestos. I understand that the contamination effect is a one-shot deal.
"All you require is one exposure in your lifetime and it can have very grave consequences for your health. That is a very great concern for you."
Cameron was one of four men found at the scene who was subjected to the decontamination after disturbing the asbestos-lined roofing.
The court was told that although the farmer's barn appeared to be disused it would cost £80,000 to reinstate it after the beams were ripped out.
Fiscal depute Stuart Richardson dropped charges against three co-accused because Cameron had admitted he was the "brains" of the scheme and the others had simply been asked to help him.
The 27-year-old, of Perth Street, Blairgowrie, admitted stealing a quantity of steel beams from East Mill Farm, Ashgrove Road, Blairgowrie, Perthshire, on March 28 this year.
Peter Whyte, 66, Christopher Whyte, 27, and Steven Whyte, 20, from Davie Park Place, Blairgowrie, all had not guilty pleas accepted to the same charge.
Mr Richardson said: "This crime was his idea and he enlisted them to come and help him. The premises is a shed situated in the grounds of a farm.
"It was quite dilapidated but was still being used by the farmer for storage. A neighbour was walking close by when he saw four men who appeared to be dismantling the steading.
"It was covered in asbestos sheeting and he became very concerned it would come over onto his field. He was suspicious and phoned the farmer.
Solicitor Jamie Baxter, defending, said: "This was a dilapidated old farm barn. It was used for dumping old fridges, washing machines and rubbish. It was a stupid and naive attempt.
"He thought there was potentially some money in the steel beams. He formed a plan but it was rumbled early on. They took down 20 steel beams but had not given any thought to the dangers involved.
"They were wearing gloves and face masks, but that was simply because it would be dusty."
Cameron was fined £225.