Network switch prices have come down significantly, so most businesses and homes are likely to have a new or used replacement switch (or even router) somewhere in a box or drawer, which can be used in case of emergency, if the network fails. There is however a simpler solution, which doesn't require power and costs
something like 0.30 USD.
This one dollar accessory can be used to connect two network cables temporarily, until the switch is fixed or replaced. In most cases you have to rethink the connections a bit, so you connect the two most important parts of the network, which cannot be down for more than a few minutes. In some cases you can even use a few of these connectors to completely take the place of a switch, if you have more cables coming from other parts of the network.
I wouldn't recommend using such connectors as a permanent solution, as most of them can affect signal strength.
This is how it looks on the inside. As you can see the two connectors are wired together using multi-strand wires, which can reduce signal quality, also reducing the maximum cable length or network speed. This is why I don't recommend using them as a permanent solution, but if you do the necessary bandwidth and cable test, and they look OK, then there's no reason not to use them long term.