In islanded microgrid (MG) applications, renewable-based distributed generation units (DGUs) are commonly operated in grid-feeding mode, while storage-based DGUs assume the grid-forming responsibilities. This results in limited controllable power reserves, which may pose severe threats to the overall system stability. Motivated by this, we consider the problem of designing a more flexible grid-aware control scheme for enlarging the actuation power of a DC MG. That is, existing DGUs are able to adopt different operation modes by switching among two decentralized passivity-based subsystem control laws in dependency of their node status. To this purpose, we design a time- and state-dependent switching logic that coordinates the DGU mode transitions and ensures that the closed-loop interconnected MG possesses a unique equilibrium point. Then, we derive sufficient tuning conditions on the control parameters that ensure global exponential stability of this equilibrium by adopting a multiple Lyapunov functions approach that exploits the passive interconnection properties of the MG together with dwell-time methods for switched systems. The advantageous performance of the proposed strategy is illustrated via a numerical example.