I’m trying to wire multiple outlets that are powered by a switch. I do not need to split the outlets. The power is coming to the outlets from the panel first. The switch is on the end of the run. Would prefer a diagram for the answer. Thanks
If the switch is at the end of the run then you will need 3-conductor cable between the several outlets and between the outlets and the switch.
Pass the hot through all the outlet boxes to the switch via the black wires.
Pass the neutral through all the outlet boxes to the switch via the white wires, and also connect the neutral to the neutral side of each outlet via white pigtails.
At the switch, leave the white neutral wire capped off. This is required by code against the possible future installation of a powered switch.
Connect the black and red wires to the switch. The red becomes the switched-hot.
Pass the switched-hot back to all the outlets via the red wires. At each outlet except the one furthest from the switch, connect the hot side of the outlet to the switched-hot via a red pigtail.
Using the pigtails as illustrated will avoid the potential embarrassing situation where a connection fails at one outlet but other outlets stop working.
Also note that if in future you decide to split any of the outlets, you already have constant-hot available in every outlet box.