Batch file 需要一个基本的批处理文件脚本用于服务器上的运行状况检查
我正在寻找一个简单的批处理文件,可以给我以下服务器列表的详细信息。只有一个域Batch file 需要一个基本的批处理文件脚本用于服务器上的运行状况检查,batch-file,Batch File,我正在寻找一个简单的批处理文件,可以给我以下服务器列表的详细信息。只有一个域 主机名 IP地址 领域 磁盘细节 CPU信息 物理存储器 操作系统详细信息 服务器类型 我自己做了一个,但它似乎不是为一个服务器列表运行的,它只是为一个服务器运行了很多次。请帮助我,下面是代码: for /f %%x in (computers.txt) do systeminfo | findstr /c:"Host Name" >> C:\temp\output.txt for /f %%x in
- 主机名
- IP地址
- 领域
- 磁盘细节
- CPU信息
- 物理存储器
- 操作系统详细信息
- 服务器类型
for /f %%x in (computers.txt) do systeminfo | findstr /c:"Host Name" >> C:\temp\output.txt
for /f %%x in (computers.txt) do wmic cpu get name >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"Domain" >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"OS Name" >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"OS Version" >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"System Manufacturer" >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"System Model" >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"System type" >> C:\temp\output.txt
for /f %%x in (computers.txt) do systeminfo | findstr /c:"Total Physical Memory" >> C:\temp\output.txt
for /f %%x in (computers.txt) do ipconfig | findstr IPv4 >> C:\temp\output.txt
for /f %%x in (computers.txt) do wmic diskdrive get size >> C:\temp\output.txt
for /f %%x in (computers.txt) do dsquery computer -name %%x >> C:\temp\output.txt
如果我假设您在
computers.txt
中获得了服务器名称列表
computers.txt
中的所有行,并提供机器的系统信息输出,在该机器上执行每个非预期的迭代computers.txt
中迭代所有行
systeminfo/s/U/p