tiexuedanxin

 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
}

 

posted on 2019-06-03 09:20 Michael_Cheung 阅读(...) 评论(...) 编辑 收藏

相关文章: