使用wmic查看远程服务器磁盘空间剩余量
1、准备工作
1.1、远程服务器的IP、主机账号及密码
确认远程服务器IP地址、主机账号及密码。
1.2、服务
确认开启Remote Procedure Call (RPC)、Remote Procedure Call (RPC) Locator服务
1.2、防火墙及端口
查看远程服务器是否开启防火墙,若开启防火墙,则必须开通135端口
2、远程查询磁盘空间状态
2.1、查询远程计算机磁盘状态,本地输出
wmic /node:”[IP]″ /user:”[username]” /password:”[password]″ logicaldisk where "name='c:'" get DeviceID,Size,FreeSpace,Description,FileSystem
如:wmic /node:”192.168.5.20″ /user:”administrator” /password:”123456789″ logicaldisk where "name='c:'" get DeviceID,Size,FreeSpace,Description,FileSystem
2.2、查询远程计算机磁盘状态,输出到指定文件
WMIC /node:"[IP]" /user:"[username]" /password:"[Password]" /output:[outputfilename] logicaldisk where "name='[disk]'" get DeviceID,Size,FreeSpace,Description,FileSystem /format:htable
如:WMIC /node:"192.168.5.20" /user:"Administrator" /password:"123456789" /output:outputly.html logicaldisk where "name='c:'" get DeviceID,Size,FreeSpace,Description,FileSystem /format:htable
3、使用wmic查询本地计算机磁盘空间使用情况:https://blog.csdn.net/u012943043/article/details/107447778
本文地址:https://blog.csdn.net/u012943043/article/details/107448080