Similar to conventional systems, having acceptable voltage and frequency is necessary in a microgrid (MG). This issue is realized by grid in grid-connected mode. But in islanded mode, it depends on proper controllers in primary, secondary and emergency levels. Security in MG following a severe disturbance can be established through emergency control like shutdown of a unit, demand side management, islanding and load shedding. In this paper, a controller is designed to stabilize MG performance during islanding. Also, a load shedding plan as one of the last actions to prevent blackout of isolated system is presented.