常用备注

windows下
netstat -na | findstr ESTAB | findstr 80

 

远程桌面关机

关机 shutdown -s -t 10
重启 shutdown -r -t 10

 


net use \\192.168.0.10 123456/user:administrator
shutdown -r -m \\192.168.0.10 –t 0
shutdown -s -m \\192.168.0.10 –t 0


@echo off
::判断服务是否被禁用,如果被禁用就设置为自动
wmic service where "name="mysql" and startmode="disabled"" call changestartmode
::判断服务是否启动,如果未启动就启动此服务
wmic service where "name="mysql" and state="stopped"" call startservice

 

你可能感兴趣的:(常用)