当前位置: 移动技术网 > 科技>操作系统>windows > Powershell - 获取服务器启动时间

Powershell - 获取服务器启动时间

2019年06月04日  | 移动技术网科技  | 我要评论

对号入座守则,大连下水道疏通,退休政策

 www.orangeisland.cn

 

使用以下命令,直接获取服务器启动时间:

 

 通过以下脚本,批量获取服务器的启动时间:

$textpath = "c:\users\admin\desktop\serverlist.txt";
$txtcon=get-content($textpath)
foreach($linecon in $txtcon)
{
echo $linecon
get-wmiobject win32_operatingsystem -computername $linecon | fl csname,lastbootuptime,name >>c:\users\admin\desktop\bootup_result.txt
}

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网