Is it okay to unplug the power first and then the battery
240KW/400KW industrial rooftop - commercial rooftop - home rooftop, solar power generation system.
The safe way to unplug your desktop computer is to shut down Windows properly until the machine turns itself off, at which point you can pull the plug. If you have a laptop, you can unplug at any time since the laptop battery will continue to power the machine and a low-battery situation will cause it to turn itself off.