码迷,mamicode.com
首页 > 系统相关 > 详细

修改IP地址的PowerShell

时间:2015-06-03 15:34:07      阅读:1821      评论:0      收藏:0      [点我收藏+]

标签:

$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = ‘true‘"

$wmi.EnableStatic("10.0.0.15", "255.255.255.0")

$wmi.SetGateways("10.0.0.1", 1)

$wmi.SetDNSServerSearchOrder("10.0.0.100")

 

来源

==============

Use PowerShell to Configure Static IP and DNS Settings

http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/28/use-powershell-to-configure-static-ip-and-dns-settings.aspx

修改IP地址的PowerShell

标签:

原文地址:http://www.cnblogs.com/awpatp/p/4549119.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!