zoukankan
html css js c++ java
设置IP的VBS
今天整理资料,看到一段同事上半年写的VBS。上半年有大量服务器要求换IP地址,由于是半夜,做个AT就省事多了。
strComputer
=
"
.
"
Set
objWMIService
=
GetObject
(
"
winmgmts:\\
"
&
strComputer
&
"
\root\cimv2
"
)
Set
colNetAdapters
=
objWMIService.ExecQuery _
(
"
Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE
"
)
strIPAddress
=
Array
(
"
218.5
.
"
)
'
IP Addr.
strSubnetMask
=
Array
(
"
255.255.255.224
"
)
'
子网掩码
strGateway
=
Array
(
"
218.5
"
)
'
网关
strGatewayMetric
=
Array
(
1
)
For
Each
objNetAdapter in colNetAdapters
errEnable
=
objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways
=
objNetAdapter.SetGateways(strGateway, strGatewaymetric)
Next
查看全文
相关阅读:
Table Groups [AX 2012]
Extended Data Type Properties [AX 2012]
Base Enum Properties [AX 2012]
Dynamics AX 2012 R2 Business Connector Error
[转]System.Reflection.AssemblySignatureKeyAttribute
为博客启用MetaWeBlog API
How to create UrlSlug in Asp.Net MVC
Serialize Documents with the C# Driver
C# Driver LINQ Tutorial
Getting Started with the C# Driver
原文地址:https://www.cnblogs.com/LCX/p/629249.html
最新文章
linux 下source、sh、bash、./执行脚本的区别
centos6 安装mysql
centos 6 下编译安装 nginx
r.js build.js配置
zepto animate
python操作mysql
python time与datetime.date/datetime模块
python正则表达式练习
python中json操作
random模块
热门文章
字符串
dict字典使用方法
pycharn设置git提交代码
一张图展示:用两个栈来实现一个队列,完成队列的Push和Pop操作
Zookeeper在windows环境下安装
dubbo控制台在tomcat上的部署
Temporary TempDB Tables [AX 2012]
Temporary Tables and the TableType Property [AX 2012]
Temporary InMemory Tables [AX 2012]
Table Properties [AX 2012]
Copyright © 2011-2022 走看看