I wanted to test my defenses at sanctuary so I summoned around 200 ghouls and now the place is littered with corpses is there a way to get rid of all the bodies at once instead of going one by one and disabling one at time. On the bright side my defenses worked great!
Not via console commands.
In order to delete the bodies, you will have to target each body individually and delete them via the console. There are currently no console commands to distinguish between those 200 ghouls you summoned verses all the other NPCs around the area that were there already.
Alternatively, you may be able to trigger an area reset by going to a far away place and sleep/rest for 30 days straight. This should be enough time to trigger built-in map area reset and clean up the place.