Distributed Generation and Resilience in Power Grids