Sally is right. If you scold them they will come to the conclusion that you think pooping is bad, and will try to hide it.
If you catch them in the act tell them a firm no, and pick up and take to the proper place then give them the cue word (potty or poopies or whatever you use). If you find the evidence after the fact, just quietly clean it up and go about your business. I generally will act a little disappointed, but don't scold.
Of course, we also need to remember that each dog has a different personality, and there are some who are "potty shy" naturally.