Powershell-查询主机名及IP地址

Dos查询IP地址及主机名信息: 1.ipconfig | find "IPv4" 2.hostname 3.systeminfo |find "主机名:" 默认很多人总是习惯用DOS命令查询,其实Powershell实现起来也是很简单的。如下: Powershell查询IP地址及主机名信息: 1.foreach($ipv4 in (ipconfig) -like '*IPv4*') { (
相关文章
相关标签/搜索