Chinaunix首页 | 论坛 | 博客
  • 博客访问: 294368
  • 博文数量: 69
  • 博客积分: 3370
  • 博客等级: 中校
  • 技术积分: 1035
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-25 10:52
文章分类

全部博文(69)

文章存档

2019年(1)

2009年(7)

2008年(61)

我的朋友

分类: WINDOWS

2008-06-18 21:00:48

windows 2003 /windows xp
 
改内外网卡名:密码注意加双引号
psexec.exe @c:\gso.txt -u administrator -p "password" netsh interface set interface name="Local Area Connection" newname="60"
psexec.exe @c:\gso.txt -u administrator -p "password" netsh interface set interface name="Local Area Connection 2" newname="10"
单ip内外网卡名
psexec.exe -u administrator -p "password" netsh interface set interface name="Local Area Connection" newname="60"
psexec.exe -u administrator -p "password" netsh interface set interface name="Local Area Connection 2" newname="10"
改密码
pspasswd.exe @c:\gso.txt -u administrator -p "password" administrator "password1"
pspasswd.exe -u administrator -p "password" administrator "password1"
改内网ip
无网关:
psexec.exe -u administrator -p "password" netsh interface ip set address name="10" static 10.152.1.12 255.255.0.0
有网关:
psexec.exe -u administrator -p "password" netsh interface ip set address name="10" static 10.152.1.204 255.255.0.0 10.152.0.1 1
双ip
psexec.exe -u administrator -p "password" netsh interface ip add address name="222" 222.73.209.171 255.255.255.192
dns
wins
psexec.exe -u administrator -p "password" netsh interface ip set wins "Local Area Connection" static 192.168.5.114
网卡配置检查
psexec.exe -u administrator -p "password" ipconfig /all
psexec.exe @c:\gs.txt -u administrator -p "password" ipconfig /all

路由删除,增加,查看:
psexec.exe -u administrator -p "password" route delete 192.168.10.217
psexec.exe -u administrator -p "password" route add 192.168.10.0 mask 255.255.255.0 10.152.0.1 -p
psexec.exe -u administrator -p "password" route print
psexec.exe @c:\gs.txt -u administrator -p "password" route delete 192.168.10.217
psexec.exe @c:\gs.txt -u administrator -p "password" route add 192.168.10.0 mask 255.255.255.0 10.152.0.1 -p
psexec.exe @c:\gs.txt -u administrator -p "password" route print
重启服务器:
psshutdown.exe -u administrator -p "password" -r -t 0
psshutdown.exe @c:\gs.txt -u administrator -p "password" -r -t 0
批量重新启动/关闭服务
psservice.exe @c:\gs.txt -u administrator -p 密码 start KartCS
获取帐户SID号:
psgetsid.exe -u administrator -p "password"
psgetsid.exe @c:\gs.txt -u administrator -p "password"
type c:\gs.txt
10.152.1.12
10.152.1.13
10.152.1.14
注意:ctrl+A全选中,后面不能有空格.
补充:
Invalid interface 60 specified.网卡名不对
222.73.209.183 is not an acceptable value for source. 网卡自动获取不到

报错的信息列表:
代表命令成功
route exited on 10.152.1.99 with error code 0.
代表网络不存在机器或者admin服务未开
     :
Couldn't access ;10.152.3.11     :
The network path was not found.
Make sure that the default admin$ share is enabled on ;10.152.3.11 
代表用户名和密码问题
   :
Couldn't access 10.152.1.100   :
Logon failure: unknown user name or bad password.
代表注销的ip
Make sure that the default admin$ share is enabled on ;10.152.3.99   .

网卡名错误:
C:\PsTools>psexec.exe -u administrator -p KmWb988L7U666p netsh in
terface ip set address name="10" static 10.152.1.102 255.255.0.0
Invalid interface 10 specified.
netsh exited on 10.152.0.153 with error code 1.
 
未完,待续.....
阅读(2616) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~