我们可以指示netsh.exe将其输出转储到xml文件吗?

时间:2012-02-07 05:12:03

标签: networking operating-system netsh tcp-ip

假设我在命令提示符下输入以下命令:

netsh.exe interface ip show config "Local Area Connection" > c:\temp\dump.txt

此命令将输出转储到文本文件。我希望以xml格式转储相同的输出。有可能吗?

1 个答案:

答案 0 :(得分:0)

这并不是天真支持的。但您可以使用Jeremy Engel的PowerShell DHCP Cmdlet:

http://gallery.technet.microsoft.com/scriptcenter/05b1d766-25a6-45cd-a0f1-8741ff6c04ec

这将在netsh命令周围创建PowerShell对象,然后您可以从这些对象创建xml文件。