How do I target an NPC when using console commands?

Solution 1:

You have to click on them while the console is open. Then type the command and press Enter.