Passive Voice with ''to be to be and past participle'' [duplicate]

Several times I've heard sentences like You are not to be here. whereas I'd expected something with should. Or He is absolutely not to know..

What is this form? When should I use it?


Be+to infinitive is used when you want to express future events, orders, things that should be/not be done, etc.

The link is self-explanatory.

You are not to be here means: You should not be here. You shoud never come here.

He is absolutely not to know means: He should not become aware of what has been discussed/what happened, etc. You should not tell him anything about them.