It depends. Are you talking main line D&D, or pathfinder ?
In 3.5 and 4E, undead don't have to be evil at all, so that's a false assumption to make.
In Pathfinder, all undead are evil, bar a single exception in the form of Ghosts, but they're naturally occuring returning spirits, not something necromancers can make. There used to be Juju spirits, but the moment the Pathfinder devs noticed that allowed necromancers to make non-evil undead, they put their foot down hard.
So, in Pathfinder at least :
Mindless undead are vicious, murderous spirits shoved into inert bodies. If freed from a necromancer's control, they'll immediately start slaughtering everything in sight. A necromancer can easily make mindless undead and remain neutral himself, so long as he keeps a tight leash on his mindless undead. Maybe even good if the owner of the desecrated bodies gave their permission.
But sentient undead... Oh boy. Creating a sentient undead automatically turns the original creature to evil. You're forcefully taking a dead soul, desecrating and corrupting it forever with negative energy shenanigans, then shoving it back into its body. Because of the existence of an afterlife, this is a fate infinitely worse than death and any pathfinder necromancer who creates a sentient undead becomes Evil with a capital E.