The works is a colloquial expression meaning the entirety of something: a hamburger with the works, for instance, is a hamburger with all available condiments and relishes.
To "get the works" is typically employed with legal sentences: to be sentenced to the most severe punishment permitted. This expression corresponds to "give [someone] the works", to deal out the most severe punishment permitted.
The name "Constantinople" got the works: it received an onomastic death penalty, being completely replaced by the Turkish derivative, "Istanbul".