if there is, i am unaware of such a command. You could always use the creation kit to edit whatever NPC you want. I'm pretty sure it's a simple process, just changing an option in the NPC's properties from non-essential to essential.
--------------------------------------------------------------------------- Give a man a gun, and he can rob a bank. Give a man a bank, and he can rob the world. Give a moose a cookie, and it will probably want a glass of milk. -Wisdom
Try using the following console command to change Lydia from non-essential to essential, making sure you have nothing selected(item, NPC, etc.) in-game before you open the console:
setessential 000A2C8E 1
hope that helps.
--------------------------------------------------------------------------- Give a man a gun, and he can rob a bank. Give a man a bank, and he can rob the world. Give a moose a cookie, and it will probably want a glass of milk. -Wisdom
not sure why it wouldn't work. the only thing i can think of is that you may have had something selected in game before you opened the console and entered the command.
if you have something selected when you open the console there will be a REF ID in the command window for whatever you have selected. make sure there is no ref id when you open the console and you should be fine...good luck.
--------------------------------------------------------------------------- Give a man a gun, and he can rob a bank. Give a man a bank, and he can rob the world. Give a moose a cookie, and it will probably want a glass of milk. -Wisdom
Try the nexus website or Steam workshop there are plenty of Essential Housecarl/companion mods on there that make all housecarls/companionms immortal/essential