Read the riot act (to someone)

To give someone a strong warning or scolding.

The teacher read the riot act to her students when they began to misbehave in class.