等效IPConfig和NSLookup的常用PowerShell网络命令
时间:2023-11-12 14:54:59
一定知道 IPConfig、PING 和 NSLookup 这 3 个非常常用的网络测试命令,虽然在 Powershell 中这 3 个命令还是可以使用,我们今天还是向大家介绍中等效 IPConfig、PING 和 NSLookup 命令的 3 个常用 Powershell 网络命令。
IPConfig
如果你经常使用 IPConfig 命令来查看 Windows 中每个网卡的 TCP/IP 配置信息,在 PowerShell 中如下 2 条命令与其功能类似:
Get-NetIPConfiguration#或Get-NetIPAddress
Get-NetIPConfiguration cmdlet 可以直接获取当前计算机中每块网卡的 TCP/IP 配置信息,Get-NetIPAddress 可以获取当前计算机的所有 IP 地址配置信息。
PING
在 PowerShell 中可以使用 Test-NetConnection cmdlet 来获取与 PING 命令等效的网络连接诊断信息,它可以在 DNS 查询到 IP 地址之后进行 TCP 连接测试,并输出测试结果。
从上图中大家可以看到,Test-NetConnection 还可以使用 -TraceRoute 参数获取路由的路径和跳数,该功能相当于 tracert 命令。
NSLOOKUP
Powershell 中可以使用 Resolve-DnsName cmdlet 来等效 NSLOOKUP 进行 DNS 名称查询,与 nslookup 交互式使用方法不同的是,Resolve-DnsName 可以直接跟像 -Server 这样的参数来指定要查询的 DNS 服务器,非常方便。
等效IPConfig和NSLookup的常用PowerShell网络命令的下载地址:
标签:PowerShell网络命令
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
如何将windows文件夹挂载到linux虚拟机下
2022-08-07 10:26:16
![](https://img.aspxhome.com/file/2023/29/a256595_0s.jpg)
电脑版wps如何取消隐藏的文档内容
2023-02-28 06:23:39
![](https://img.aspxhome.com/file/2023/6/a183696_0s.png)
WPS表格文字如何实现横竖转换?
2022-07-30 12:31:32
![](https://img.aspxhome.com/file/2023/9/a184209_0s.png)
WPS演示制作动态效果艺术字体的方法
2023-07-01 13:06:49
电脑管理打不开怎么办
2022-03-13 08:26:35
![](https://img.aspxhome.com/file/2023/9/a342950_0s.png)
win10网络打印机脱机怎么处理
2023-03-15 22:09:27
![](https://img.aspxhome.com/file/2023/3/a294150_0s.png)
赛博朋克2077和强尼交谈怎么完成?
2023-02-25 16:58:17
![](https://img.aspxhome.com/file/2023/6/a324720_0s.jpg)
XP系统网上邻居提示“workgroup无法访问”如何解决
2023-04-02 22:20:11
![](https://img.aspxhome.com/file/2023/1/a273874_0s.jpg)
wps自动备份在哪里
2022-08-19 05:15:57
![](https://img.aspxhome.com/file/2023/0/a164270_0s.png)
2020年win10系统好用吗
2023-11-09 10:51:58
![](https://img.aspxhome.com/file/2023/8/48178_0s.jpg)
Excel表格中显示成绩及格和不及格的操作方法
2023-01-27 15:29:03
win7隐藏QQip地址的方法
2022-11-21 02:38:19
![](https://img.aspxhome.com/file/2023/29/a262063_0s.png)
在Word2007中如何更正拼写时忽略Internet和文件地址
2022-12-28 12:31:11
![](https://img.aspxhome.com/file/2023/1/29771_0s.jpg)
XP系统如何安装使用dbc2000中文汉化版?
2022-05-31 01:28:19
![](https://img.aspxhome.com/file/2023/4/a308168_0s.jpg)
win7系统防火墙不要有什么具体的关闭方法
2022-01-25 09:23:58
![](https://img.aspxhome.com/file/2023/5/a316973_0s.png)
无信用卡可以创建其他地区Apple ID吗?如何创建
2022-09-10 10:07:44
PPT幻灯片中触发器怎么用
2022-11-13 12:55:23
Win11可以安装安卓软件吗?Win11安装安卓应用详细教程
2022-05-16 14:36:37
![](https://img.aspxhome.com/file/2023/27/a237751_0s.jpeg)
Win7提示驱动器中没有软盘怎么办?
2022-09-05 09:45:22
![](https://img.aspxhome.com/file/2023/4/a311811_0s.png)
excel表格怎样用公式计算累计求和
2022-07-21 15:34:49