How about an item three ways? Here is the DnD 5e way.
Undead Spike
Wondrous item, very rare
This heavy cold iron spike contains some of the oldest necromancy in existence. As an action, you may make a melee weapon attack with with you are proficient with the spike against an undead creature that is adjacent to a surface, either vertical or horizontal. On a hit against an undead creature, the target must make a DC 19 Constitution save. On a failure, the creature is impaled against the surface. The creature cannot remove the spike if it failed the original save nor can it use magic or abilities to cause another creature to remove the spike via mind control. A creature may willingly removed the spike ending the effect against the original target. On a successful save, the creature just takes 1d6 magic piercing damage with no other effect.
Thoughts?