This study examines a P+multi resonant-based voltage control for voltage harmonics compensation under the islanded mode of a microgrid. In islanded mode, the inverter is defined as a voltage source to supply the full local load demand without the connection to the grid. On the other hand, the output voltage waveform is distorted by the negative and zero sequence components and current harmonics due to the unbalanced and nonlinear loads. In this paper, the P+multi resonant controller is used to compensate for the voltage harmonics. The gain tuning method is assessed by the tendency analysis of the controller as the variation of gain. In addition, this study analyzes the slight voltage magnitude drop due to the practical form of the P+multi resonant and proposes a counter method to solve this problem by adding the PI-based voltage restoration method. The proposed P+multi resonant controller to compensate for the voltage harmonics is verified through the PSIM simulation and experimental results.