The sharp increase in renewable energy generation and the number of electric vehicles enhance power systems' modernization, decarbonization, and decentralization. As a result, microgrids (MGs) with renewable energy integration and charging facilities have attracted significant attention. Nonetheless, disregarding uncertainties in optimization models for MGs can lead to either risky or costly decisions. In addition, sustainable development and operation of MGs must enhance the system's resiliency to guarantee functionality during abnormal situations. Therefore, this paper proposes a two-stage stochastic programming model to ensure the resilient operation of microgrids with charging facilities. At the same time, uncertainties associated with renewable generation, demand, and market price are addressed via scenarios. To enhance resiliency against unplanned islanding, a scenario for outages is defined so that preventive actions can be done in the first stage to robust the energy management of the microgrid.