Ezekiel 20:3
"Son of man, speak to the elders of the house of Israel, and you shall say to them, Thus says the Lord; Are you⌃ come to enquire of me? [As] I live, I will not be enquired of by you, says the Lord."
Does this verse indicate that God is not omniscient?
These verses are actually examples of how a typical Ancient Near Eastern sovereign addressed his subjects (or how any person might address another in an investigatory role). They speak in the form of a question to prompt a response or confession, even when the answer is already fully known.