Let $k$ be an algebraically closed field of characteristic $0$ and let $\mathfrak{h}$ be a finite dimensional $k$-Lie algebra. I'm interested in knowing which (Lie algebraic) properties $\mathfrak{h}$ must possess so that $$(\wedge^{2}\mathfrak{h})^{\mathfrak{h}}:=\{f\in \wedge^{2}\mathfrak{h}: h\cdot f=0 \forall h\in \mathfrak{h}\}$$ (where $\cdot$ denotes the canonical action of $\mathfrak{h}$ on $\wedge^{2}\mathfrak{h}$) contains a $1$-dimensional (possibly trivial) $\mathfrak{h}$-submodule.

It is known (proved in, I think, Weibel's ``Introduction to Homological Algebra") that, for any such Lie algebra $\mathfrak{h}$, $$(\wedge^{2}\mathfrak{h})^{\mathfrak{h}}\cong H^{2}(\mathfrak{h})$$

So, we can say a couple of things:

If $\mathfrak{h}$ is semisimple, then $H^{2}(\mathfrak{h})=0$ (Whitehead's second Lemma), so $(\wedge^{2}\mathfrak{h})^{\mathfrak{h}}=0$. What about a converse (i.e. if $\mathfrak{g}$ finite dimensional Lie algebra and $H^{2}(\mathfrak{g})=0$, what can we say about $\mathfrak{g}?$)

If $\mathfrak{h}$ is nilpotent, then the trivial module exists as a $1$-dimensional $\mathfrak{h}$-module of $\wedge^{2}\mathfrak{h}$.

Does a classification of Lie algebras $\mathfrak{h}$ with 1-dimensional $\mathfrak{h}$-submodules in $(\wedge^{2}\mathfrak{h})$ exist?