Microgrids are presently receiving great attention and are considered the future trend for power distribution systems. This paper presents the control and management of a microgrid with distributed energy resources connected to a single bus. The microgrid management system uses a centralized and heuristic approach that considers the stochastic production of a photovoltaic power source, the use of a fuel cell, the state of charge of batteries, the variable load profile, and the flag-color of electricity tariff. The goal of the control and management system is the reliable and economic using of energy resources and their integration to power distribution systems while preserving the power quality. The responses regarding the control system of the power inverters connected to the distributed energy resources in the microgrid are evaluated during grid connection, standalone operation, and transition between the aforementioned operating modes. Simulation results prove that the control and management strategy is suitable in all operating conditions of the microgrid. The whole system composed of distributed energy resources, power electronic systems, and their respective control approaches that allow power management were developed in PSCAD/EMTDC simulation program.