Can you clarify what you mean by “windows data power on-off”, is that the power usage of the computer, or whether it’s on or not, or something else entirely?
As for sql express server, do you want to check if it’s running, or turning it on/off? From what I remember from my sqlserver days on Windows (some 6 years ago) it was always running until you stopped the service. Do you want to interact with the Windows Services to see the status?
Edit: Julian (@TotallyInformation) is far more of a windows expert, I’m stepping back from this topic, appears the end of my knowledge on this is reached already ![]()