There is no way that admonishing a potential employer is going to work out in your favor. Discretion is the better part of valor here.
Option 1 is that despite your assumption, they haven't actually finished the process. Sometimes it takes time to interview everyone. Sometimes it takes time to negotiate with the first choice or the first choice accepts the offer but then decides to accept a counteroffer a couple weeks later. If you write to complain, that's just going to make the employer less likely to consider you favorably-- who wants to work with someone that is complaining before they even start?
Option 2 is that you interviewed with a good company that intends to let candidates know that they weren't selected but just failed to do so in your case. If so, you're basically in the position of calling someone out for behaving impolitely. Sure, you might get an apology but you'll put also raise questions about how, say, you would deal with a customer or business partner that made a mistake. That's going to make it less likely that this employer will consider you again in the future-- people that go right to scolding when someone else doesn't do what they aren't going to be good at building and cultivating relationships.
Option 3 is that you interviewed with a company that doesn't care. If so, consider that the lack of a reply gives you some useful information about what sort of employer you want to be working for. And if the company doesn't care, they're not going to care about your email. You might get a half-hearted apology but it is unlikely that they will do anything to make you feel better about the situation.
If you are determined to follow up, you can certainly send something like
Dear <<Hiring Manager Name>>
-
I wanted to follow up with you about the <<title>>
position I
interviewed for <<x weeks ago>>
. Am I still under consideration for
this position? If not, it was a pleasure to meet <<people you met>>
and to learn about <<company name>>
. If I am still a candidate, is
there an expected timeline for making a decision?
Sincerely,
user70848
Of course, that sort of thing is unlikely to feel particularly emotionally fulfilling when you're really upset that the employer didn't bother to reply when they decided to go in a different direction. Realistically, you're better served complaining to friends or family about how wrenching the application process can be than to send an email that admonishes a potential employer.