Final answer:
The command to prevent new switches from being elected root is spanning-tree vlan root primary.
Step-by-step explanation:
The correct answer is B) spanning-tree vlan root primary. This command is used in spanning tree protocol (STP) to specify that a particular switch should be the root switch for the specified VLAN. By entering this command, you are ensuring that new switches will not be elected as the root switch.