[Just trying out some ideas from James Ross's Philosophical Theology....]
Let's define "g" as "a necessary or necessarily existing being" and "(Ex)(gx)" as "a necessary being exists." Is g possible? It seems so, for g is not logically inconsistent. There is nothing intrinsically incoherent in coupling "necessary" and "existing." If there were, the assertion A of the impossibility of "necessary + existing" would have to be true in every possible case, and would therefore be a necessary truth-- which is to say the assertion A that "necessary existence is impossible" would necessarily exist. If A is possible, it is impossible. If A is impossible, then g is at least possible. So g is at least possible.
Now, if g is possible, the conditions of its existence entail that nothing can bring about or prevent (Ex)(gx). For if anything could bring it about that (Ex)(gx), then g is contingent, not necessary, which violates g itself. Alternatively, if anything could prevent (Ex)(gx) then g is, once more, contingent, not necessary, which violates g itself. The very possibility of g entails that no other possible state of affairs (P(~g)) could bring about or prevent (Ex)(gx). If anything P could bring about or prevent (Ex)(gx)-- producing (~g)-- then g as such would not be possible. For if (P(~g)) could bring about ~g, then g would be a contingent being, not a necessary being. The alleged possiblity of (P(~g)) entails the impossibility of g, but g is possible, so (P(~g)) is not possible. Nothing can bring about or prevent g. The possibility parameters of g exclude the possibility of its non-possibility.
So, if g is possible, there must be some explanation for its being. Define "g accounts for itself" as (gEg), and "something besides g accounts for g" as (qEg). If qEg, then q is an essential factor in g. As such, if qEg is possible, it is just as necessary as g. If, by contrast, gEg, then g exists as necessarily as any a priori truth of the form "m accounts for m insofar as m accounts for m." Hence, whatever account is given of (Ex)(gx), if g is possible, then g is necessary. If g is necessary, g is actual. Therefore, if g is possible, g is actual, and necessarily so.
If we define "G" as "God exists" and "(Eg)(Gg)" as "God exists and is a necessary being," then, if G is possible, G is actual, and necessarily so. G would have to be an omnipotent being, to which all possible effects are causally accessible, for if any effect E or set of effects (E(E)) were causally inaccessible to G, then E or (E(E)) could bring it about that G does not exist. But G not existing is impossible by definition. Therefore, G exists necessarily and omnipotently.