This article proposes a dual-active-bridge control to support the fast synthetic inertial action in DC microgrids. First of all, the selection of the isolated DC/DC converter to link an energy storage system with the DC bus in a microgrid is analyzed and the advantages of the dual-active-bridge converter controlled by a single-phase shift modulation justify its selection. An active front-end can be then adapted to connect the DC bus with an AC grid. Secondly, this paper presents the design of a discrete PI controller for supporting fast synthetic inertial action. In particular, a discrete dual-active-bridge model based on the transferred power between both converter bridges, which overcomes the approximations of the output current linearization model, is proposed. Moreover, the article introduces a novel equation set to directly and dynamically tune discrete PI parameters to fulfill the design frequency specifications based on the inversion formulae method. In this way, during the voltage/power transients on the DC bus, the controller actively responds and recovers those transients within a grid fundamental cycle. Since the developed set of control equations is very simple, it can be easily implemented by a discrete control algorithm, avoiding the use of offline trial and error procedures which may lead to system instability under large load variations. Finally, the proposed control system is evaluated and validated in PLECS simulations and hardware-in-the-loop tests.