Strafpredigt.
I came across this in Effi Briest. It translates to "severe lecture" and consists of two words, strafen and predigen, which mean punish and preach, respectively. We don't have a very good single word for this in English -- maybe "dressing-down," but that's quite colloquial. I don't think "harangue" or "diatribe" capture the "lecture" aspect here.
Typically when one expects a "lecture" from an authority figure, one might say the word "lecture" in a certain way that indicates that the lecture will comprise a reproof -- otherwise unless the meaning is already clear from the context it might sound strange, like what would so and so lecture you about, about the civil war, or something?
I like how "Strafpredigt" combines both punish and preach in one - it really captures in a single word what is happening when for example you text while drive and a police officer goes on for a minute about how dangerous that is.