There are specially designed UPS tools for LEO to do a live extraction of your PC while it's running to maintain memory state until the PC can be analyzed in a lab environment.
Basically, you connect a UPS to the same circuit / phase the PC is connected, then use a suicide cord to connect to the power strip or outlet where the PC is, then cut the PC away from the wall, outlet included.
https://cdsg.com/products/hotplug-field-kit
there are even commercial versions of the male-male power cord that cost $600+ because LEO.