Master of Undeath( Complete Mage, p. 44)
You can control an undead that you create . . . for a time.
Knowledge (religion) 5 ranks,
When you create an undead creature, you can decide that it doesn't count against your normal limit of controlled undead creatures. In this case, you still control the creature, but only for a number of days equal to your caster level. When this duration ends, the undead immediately becomes hostile to you (though you can establish control over it by other means). You can have only one creature of this kind at a time.