This question already has an answer here:
I told Dogmeat to stay outside this raider building because even though he has armor I don't want him to die. After I came out I searched the area and I couldn't find him. I think if he's told to stay somewhere he won't show up when you fast travel and I tried one post that said to hit ~ and then type
prid0001d162 and then hit enter and then type
moveto player and then hit ~ again to leave. But when I first typed in
prid0001d162 and hit enter it said "Script command prid0001d162" not found." What do I do?