开发者

How to know a computer is rebooted

开发者 https://www.devze.com 2023-01-14 23:22 出处:网络
I reboot a remote computer with Wake-on-Lan and开发者_运维问答 I would like to know if there is a way to know that the computer is idling at login screen (so I can start to do the stuff that need to b

I reboot a remote computer with Wake-on-Lan and开发者_运维问答 I would like to know if there is a way to know that the computer is idling at login screen (so I can start to do the stuff that need to be done).


You could use a Wmi query to Win32_OperatingSystem and get the LastBootupTime. If it changed since you last queried it then you can know that its booted up and responding to WMI queries, which usually means its up and running.

You could also ping, but i believe ping can respond even if the computer hasn't fully booted up yet. You could ping then wait for 60 seconds then try.

Ultimately though, its not the login screen which let's you know you can do things (unless you want to do things on the computer itself). If you want to do things through WMI, you should check WMI connectivity instead.


try to ping it or connect over TCP/IP to some service that is listening. I am pretty sure there are services listening even though you have not logged in.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号