effect = spawn_megastructure = attack_moon_1 For :
effect = spawn_megastructure = [structure_key] Example (attack moon): stellaris gigastructural engineering console commands
effect = spawn_megastructure = nicoll_dyson_beam_1 Select the megastructure (click on it in system view) then: effect = spawn_megastructure = attack_moon_1 For : effect
finish_megastructure or