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
查看全文
相关阅读:
自学Python编程的第二天----------来自苦逼的转行人
自学Python编程的第一天----------来自苦逼的转行人
A-B 高精度
A+B 高精度
[NOI2002]银河英雄传说
口袋的天空
修复公路(并查集)
并查集
Surjectivity is stable under base change
为什么Fourier分析?
原文地址:https://www.cnblogs.com/LCX/p/629249.html
最新文章
【windows】win7 sp1 系统语言中英文切换
【android】安卓的权限提示及版本相关
【 android】When an app is installed on the external storage
【android】【android studio】修改emulator的本地化环境
【android】【转发】Android中PX、DP、SP的区别
【windows】【md5】查看文件的md5值
【markdown】 markdown 语法
【linux】【指令集】查看是否打开selinux
【linux】服务说明
perf+火焰图使用
热门文章
Redis环境搭建--Redis Cluster
Redis环境搭建--Codis
Redis环境搭建--哨兵模式
Redis环境搭建--主从模式
Java8新特性学习笔记-Stream
markdown学习笔记
Java8新特性学习笔记-方法引用
自学Python编程的第五天(希望有IT大牛帮我看最下面的代码)----------来自苦逼的转行人
自学Python编程的第四天----------来自苦逼的转行人
自学Python编程的第三天----------来自苦逼的转行人
Copyright © 2011-2022 走看看