Mojira Archive
MC-74114

NoAI Ender Dragon does not take damage

 /summon EnderDragon ~ ~ ~ {NoAI:1} 

summons an Ender Dragon that does not take any damage, melee or ranged (projectiles simply pass through it as if it weren't even there).

Compare this to using

 /entitydata @e[type=EnderDragon,c=1] {NoAI:1} 

which causes it to glitch (MC-74113), but it is able to take damage (until you fix that issue by relogging).