More than three dozen unlicensed contractors have been arrested and charged after a two-day undercover operation.