If I've read you right, you're trying to put the POWER push-on/off switch from your PC on the end of about 10 m of cable.
Inside the PC, the switch connects to the motherboard and this goes into the allsorts power circuit that controls the PSU's power on/off input. This circuit is powered from the standby rail coming out of the PSU, so it's always powered while the PC has mains coming in.
There's a good chance that the power switch signal will be 5 V or 3.3 V and may pick up noise or interference on its 20 m trip up your cable and back. The thing is, you can't readily add noise filtering without knowing/experimenting what the effect will be on the PC circuit.
One solution would be something like the circuit shown below. This replaces the power switch with the transistor of an opto-isolator. That leaves you to drive the opto-isolator's IRLED and you can put plenty of noise filtering on that. Here, R1 and R2 provide the IRLED current and the ~1.6 mA drawn by R3. D2 protects the IRLED from reverse voltages, simply because IRLEDs aren't good at it rather than because they're likely to come along but you'll wish you had it there if the unforeseen happens. C1 and R3 stop high-frequency transients briefly powering the IRLED, if they ever had the current to. R3 also discharges C1 so transients have a long hill to climb. R2 stops cabling faults accidentally shorting out the PSU's standby rail. R1 protects the diodes from unexpected power supplies. It's all a lot of protection against a lot of possible hazards by a few cheap components.
The supply is shown to be taken from the PC's standby power supply but you might use other methods. In some ways, a higher supply rail going up your wires and a higher threshold at the detecting end would be nice. But in place of that, a decent load with a charging time for an RC filter is just as good.

simulate this circuit – Schematic created using CircuitLab
There's other ways of handling the noise filtering, such as by introducing a time delay. This just sketches out an option.
With this, using a single RJ45 wire would be fine but its up to you if you want to do something different.