查看文章 |
[转帖]Windows网络命令行大全5
2009年05月17日 星期日 20:51
logoff.exe > Log current user off. 注销用户 lpq.exe > Displays status of a remote LPD queue 显示远端的LPD打印队列的状态,显示被送到基于Unix的服务器的打印任务 lpr.exe > Send a print job to a network printer. 重定向打印任务到网络中的打印机。通常用于Unix客户打印机将打印任务发送给连接了打印设备的NT的打印机服务器。 lsass.exe > LSA Executable and Server DLL 运行LSA和Server的DLL lserver.exe > Specifies the new DNS domain for the default server 指定默认Server新的DNS域 macfile.exe > Used for managing MACFILES 管理MACFILES magnify.exe > Used to magnify the current screen 放大镜 makecab.exe > MS Cabinet Maker 制作CAB文件 mdm.exe > Machine Debug Manager 机器调试管理 mem.exe > Display current Memory stats 显示内存状态 migpwd.exe > Migrate passwords. 迁移密码 mmc.exe > Microsoft Management Console 控制台 mnmsrvc.exe > Netmeeting Remote Desktop Sharing NetMeeting远程桌面共享 mobsync.exe > Manage Synchronization. 同步目录管理器 mountvol.exe > Creates, deletes, or lists a volume mount point. 创建、删除或列出卷的装入点。 mplay32.exe > MS Media Player 媒体播放器 mpnotify.exe > Multiple Provider Notification application 多提供者通知应用程序 mq1sync.exe > mqbkup.exe > MS Message Queue Backup and Restore Utility 信息队列备份和恢复工具 mqexchng.exe > MSMQ Exchange Connector Setup 信息队列交换连接设置 mqmig.exe > MSMQ Migration Utility 信息队列迁移工具 mqsvc.exe > ? mrinfo.exe > Multicast routing using SNMP 使用SNMP多点传送路由 mscdexnt.exe > Installs MSCD (MS CD Extensions) 安装MSCD msdtc.exe > Dynamic Transaction Controller Console 动态事务处理控制台 msg.exe > Send a message to a user local or remote. 发送消息到本地或远程客户 mshta.exe > HTML Application HOST HTML应用程序主机 msiexec.exe > Starts Windows Installer Program 开始Windows安装程序 mspaint.exe > Microsoft Paint 画板 msswchx.exe > mstask.exe > Task Schedule Program 任务计划表程序 mstinit.exe > Task scheduler setup 任务计划表安装 narrator.exe > Program will allow you to have a narrator for reading. Microsoft讲述人 nbtstat.exe > Displays protocol stats and current TCP/IP connections using NBT 使用 NBT(TCP/IP 上的 NetBIOS)显示协议统计和当前 TCP/IP 连接。 nddeapir.exe > NDDE API Server side NDDE API服务器端 net.exe > Net Utility 详细用法看/? net1.exe > Net Utility updated version from MS Net的升级版 netdde.exe > Network DDE will install itself into the background 安装自己到后台 netsh.exe > Creates a shell for network information 用于配置和监控 Windows 2000 命令行脚本接口。 netstat.exe > Displays current connections. 显示协议统计和当前的 TCP/IP 网络连接。 nlsfunc.exe > Loads country-specific information 加载特定国家(地区)的信息。Windows 2000 和 MS-DOS 子系统不使用该命令。接受该命令只是为了与 MS-DOS 文件兼容。 notepad.exe > Opens Windows 2000 Notepad 记事本 nslookup.exe > Displays information for DNS 该诊断工具显示来自域名系统 (DNS) 名称服务器的信息。 ntbackup.exe > Opens the NT Backup Utility 备份和故障修复工具 ntbooks.exe > Starts Windows Help Utility 帮助 ntdsutil.exe > Performs DB maintenance of the ADSI 完成ADSI的DB的维护 ntfrs.exe > NT File Replication Service NT文件复制服务 ntfrsupg.exe > ntkrnlpa.exe > Kernel patch 核心补丁 ntoskrnl.exe > Core NT Kernel KT的核心 ntsd.exe > ntvdm.exe > Simulates a 16-bit Windows environment 模拟16位Windows环境 nw16.exe > Netware Redirector NetWare转向器 nwscript.exe > runs netware scripts 运行Netware脚本 odbcad32.exe > ODBC 32-bit Administrator 32位ODBC管理 odbcconf.exe > Configure ODBC driver`s and data source`s from command line 命令行配置ODBC驱动和数据源 os2.exe > An OS/2 Warp Server (os2 /o) OS/2 os2srv.exe > An OS/2 Warp Server OS/2 os2ss.exe > An OS/2 Warp Server OS/2 osk.exe > On Screen Keyboard 屏幕键盘 packager.exe > Windows 2000 Packager Manager 对象包装程序 pathping.exe > Combination of Ping and Tracert 包含Ping和Tracert的程序 pax.exe > is a POSIX program and path names used as arguments must be specified in POSIX format. Use "//C/Users/Default" instead of "C:\USERS\DEFAULT." 启动便携式存档互换 (Pax) 实用程序 pentnt.exe > Used to check the Pentium for the floating point division error. 检查Pentium的浮点错误 perfmon.exe > Starts Windows Performance Monitor 性能监视器 ping.exe > Packet Internet Groper 验证与远程计算机的连接 posix.exe > Used for backward compatibility with Unix 用于兼容Unix print.exe > Cmd line used to print files 打印文本文件或显示打印队列的内容。 progman.exe > Program manager 程序管理器 proquota.exe > Profile quota program psxss.exe > POSIX Subsystem Application Posix子系统应用程序 qappsrv.exe > Displays the available application terminal servers on the network 在网络上显示终端服务器可用的程序 qprocess.exe > Display information about processes local or remote 在本地或远程显示进程的信息(需终端服务) query.exe > Query TERMSERVER user process and sessions 查询进程和对话 quser.exe > Display information about a user logged on 显示用户登陆的信息(需终端服务) qwinsta.exe > Display information about Terminal Sessions. 显示终端服务的信息 rasadmin.exe > Start the remote access admin service 启动远程访问服务 rasautou.exe > Creates a RAS connection 建立一个RAS连接 rasdial.exe > Dial a connection 拨号连接 rasphone.exe > Starts a RAS connection 运行RAS连接 rcp.exe > Copies a file from and to a RCP service. 在 Windows 2000 计算机和运行远程外壳端口监控程序 rshd 的系统之间复制文件 rdpclip.exe > RdpClip allows you to copy and paste files between a terminal session and client console session. 再终端和本地复制和粘贴文件 recover.exe > Recovers readable information from a bad or defective disk 从坏的或有缺陷的磁盘中恢复可读取的信息。 redir.exe > Starts the redirector service 运行重定向服务 regedt32.exe > 32-bit register service 32位注册服务 regini.exe > modify registry permissions from within a script 用脚本修改注册许可 register.exe > Register a program so it can have special execution characteristics. 注册包含特殊运行字符的程序 regsvc.exe > regsvr32.exe > Registers and unregister`s dll`s. As to how and where it register`s them I dont know. 注册和反注册DLL regtrace.exe > Options to tune debug options for applications failing to dump trace statements Trace 设置 regwiz.exe > Registration Wizard 注册向导 remrras.exe > replace.exe > Replace files 用源目录中的同名文件替换目标目录中的文件。 reset.exe > Reset an active section 重置活动部分 rexec.exe > Runs commands on remote hosts running the REXEC service. 在运行 REXEC 服务的远程计算机上运行命令。rexec 命令在执行指定命令前,验证远程计算机上的用户名,只有安装了 TCP/IP 协议后才可以使用该命令。 risetup.exe > Starts the Remote Installation Service Wizard. 运行远程安装向导服务 route.exe > display or edit the current routing tables. 控制网络路由表 routemon.exe > no longer supported 不再支持了! router.exe > Router software that runs either on a dedicated DOS or on an OS/2 system. Route软件在 DOS或者是OS/2系统 rsh.exe > Runs commands on remote hosts running the RSH service 在运行 RSH 服务的远程计算机上运行命令 rsm.exe > Mounts and configures remote system media 配置远程系统媒体 rsnotify.exe > Remote storage notification recall 远程存储通知回显 rsvp.exe > Resource reservation protocol 源预约协议 runas.exe > RUN a program as another user 允许用户用其他权限运行指定的工具和程序 rundll32.exe > Launches a 32-bit dll program 启动32位DLL程序 runonce.exe > Causes a program to run during startup 运行程序再开始菜单中 rwinsta.exe > Reset the session subsystem hardware and software to known initial values 重置会话子系统硬件和软件到最初的值 savedump.exe > Does not write to e:\winnt\user.dmp 不写入User.dmp中 scardsvr.exe > Smart Card resource management server 子能卡资源管理服务器 schupgr.exe > It will read the schema update files (.ldf files) and upgrade the schema. (part of ADSI) 读取计划更新文件和更新计划 secedit.exe > Starts Security Editor help 自动安全性配置管理 services.exe > Controls all the services 控制所有服务 sethc.exe > Set High Contrast - changes colours and display mode Logoff to set it back to normal 设置高对比 setreg.exe > Shows the Software Publishing State Key values 显示软件发布的国家语言 setup.exe > GUI box prompts you to goto control panel to configure system components 安装程序(转到控制面板) setver.exe > Set Version for Files 设置 MS-DOS 子系统向程序报告的 MS-DOS 版本号 sfc.exe > System File Checker test and check system files for integrity 系统文件检查 sfmprint.exe > Print Services for Macintosh 打印Macintosh服务 sfmpsexe.exe > sfmsvc.exe > shadow.exe > Monitor another Terminal Services session. 监控另外一台中端服务器会话 share.exe > Windows 2000 和 MS-DOS 子系统不使用该命令。接受该命令只是为了与 MS-DOS 文件兼容 shmgrate.exe > shrpubw.exe > Create and Share folders 建立和共享文件夹 sigverif.exe > File Signature Verification 文件签名验证 skeys.exe > Serial Keys utility 序列号制作工具 smlogsvc.exe > Performance Logs and Alerts 性能日志和警报 smss.exe > sndrec32.exe > starts the Windows Sound Recorder 录音机 sndvol32.exe > Display the current volume information 显示声音控制信息 snmp.exe > Simple Network Management Protocol used for Network Mangement 简单网络管理协议 snmptrap.exe > Utility used with SNMP SNMP工具 sol.exe > Windows Solitaire Game 纸牌 sort.exe > Compares files and Folders 读取输入、排序数据并将结果写到屏幕、文件和其他设备上 SPOOLSV.EXE > Part of the spooler service for printing 打印池服务的一部分 sprestrt.exe > srvmgr.exe > Starts the Windows Server Manager 服务器管理器 stimon.exe > WDM StillImage- > Monitor stisvc.exe > WDM StillImage- > Service subst.exe > Associates a path with a drive letter 将路径与驱动器盘符关联 svchost.exe > Svchost.exe is a generic host process name for services that are run from dynamic-link libraries (DLLs). DLL得主进程 syncapp.exe > Creates Windows Briefcase. 创建Windows文件包 sysedit.exe > Opens Editor for 4 system files 系统配置编辑器 syskey.exe > Encrypt and secure system database NT账号数据库按群工具 sysocmgr.exe > Windows 2000 Setup 2000安装程序 systray.exe > Starts the systray in the lower right corner. 在低权限运行systray taskman.exe > Task Manager 任务管理器 taskmgr.exe > Starts the Windows 2000 Task Manager 任务管理器 tcmsetup.exe > telephony client wizard 电话服务客户安装 tcpsvcs.exe > TCP Services TCP服务 .exe > Telnet Utility used to connect to Telnet Server termsrv.exe > Terminal Server 终端服务 tftp.exe > Trivial FTP 将文件传输到正在运行 TFTP 服务的远程计算机或从正在运行 TFTP 服务的远程计算机传输文件 tftpd.exe > Trivial FTP Daemon themes.exe > Change Windows Themes 桌面主题 tlntadmn.exe > Telnet Server Administrator Telnet服务管理 tlntsess.exe > Display the current Telnet Sessions 显示目前的Telnet会话 tlntsvr.exe > Start the Telnet Server 开始Telnet服务 tracert.exe > Trace a route to display paths 该诊断实用程序将包含不同生存时间 (TTL) 值的 Internet 控制消息协议 (ICMP) 回显数据包发送到目标,以决定到达目标采用的路由 tsadmin.exe > Terminal Server Administrator 终端服务管理器 tscon.exe > Attaches a user session to a terminal session. 粘贴用户会话到终端对话 tsdiscon.exe > Disconnect a user from a terminal session 断开终端服务的用户 tskill.exe > Kill a Terminal server process 杀掉终端服务 tsprof.exe > Used with Terminal Server to query results. 用终端服务得出查询结果 tsshutdn.exe > Shutdown the system 关闭系统 unlodctr.exe > Part of performance monitoring 性能监视器的一部分 upg351db.exe > Upgrade a jet database 升级Jet数据库 ups.exe > UPS service UPS服务 user.exe > Core Windows Service Windows核心服务 userinit.exe > Part of the winlogon process Winlogon进程的一部分 usrmgr.exe > Start the windows user manager for domains 域用户管理器 utilman.exe > This tool enables an administrator to designate which computers automatically open accessibility tools when Windows 2000 starts. 指定2000启动时自动打开那台机器 verifier.exe > Driver Verifier Manager Driver Verifier Manager vwipxspx.exe > Loads IPX/SPX VDM 调用IPX/SPX VDM w32tm.exe > Windows Time Server 时间服务器 wextract.exe > Used to extract windows files 解压缩Windows文件 winchat.exe > Opens Windows Chat 打开Windows聊天 winhlp32.exe > Starts the Windows Help System 运行帮助系统 winlogon.exe > Used as part of the logon process. Logon进程的一部分 winmine.exe > windows Game 挖地雷 winmsd.exe > Windows Diagnostic utility 系统信息 wins.exe > Wins Service Wins服务 winspool.exe > Print Routing 打印路由 winver.exe > Displays the current version of Windows 显示Windows版本 wizmgr.exe > Starts Windows Administration Wizards Windows管理向导 wjview.exe > Command line loader for Java 命令行调用Java wowdeb.exe > . For starters, the 32-bit APIs require that the WOWDEB.EXE task runs in the target debugee`s VM 启动时,32位API需要 wowexec.exe > For running Windows over Windows Applications 在Windows应用程序上运行Windows wpnpinst.exe > ? write.exe > Starts MS Write Program 写字板 wscript.exe > Windows Scripting Utility 脚本工具 wupdmgr.exe > Starts the Windows update Wizard (Internet) 运行Windows升级向导 xcopy.exe > Used to copy directories 复制文件和目录,包括子目录 修改注册表加强Win 2000安全 资料编号:23760 来源:电脑报 发布:zwh 时间:2003.04.14 15:42 人气:841 关闭窗口 1、设置生存时间 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters DefaultTTL REG_DWORD 0-0xff(0-255 十进制,默认值128) 说明:指定传出IP数据包中设置的默认生存时间(TTL)值。TTL决定了IP数据包在到达目标前在网络中生存的最大时间。它实际上限定了IP数据包在丢弃前允许通过的路由器数量.有时利用此数值来探测远程主机*作系统。 2、防止ICMP重定向报文的攻击 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters EnableICMPRedirects REG_DWORD 0x0(默认值为0x1) 说明:该参数控制Windows 2000是否会改变其路由表以响应网络设备(如路由器)发送给它的ICMP重定向消息,有时会被利用来干坏事.Win2000中默认值为1,表示响应ICMP重定向报文。 3、禁止响应ICMP路由通告报文 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Inter faces\interface PerformRouterDiscovery REG_DWORD 0x0(默认值为0x2) 说明:“ICMP路由公告”功能可造成他人计算机的网络连接异常,数据被窃听,计算机被用于流量攻击等严重后果.此问题曾导致校园网某些局域网大面积,长时间的网络异常。因此建议关闭响应ICMP路由通告报文.Win2000中默认值为2,表示当DH CP发送路由器发现选项时启用。 4、防止SYN洪水攻击 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters SynAttackProtect REG_DWORD 0x2(默认值为0x0) 说明:SYN攻击保护包括减少SYN-ACK重新传输次数,以减少分配资源所保留的时间。路由缓存项资源分配延迟,直到建立连接为止.如果synattackprotect=2,则AFD的连接指示一直延迟到三路握手完成为止.注意,仅在TcpMaxHalfOpen和TcpMaxHalfO penRetried设置超出范围时,保护机制才会采取措施。 5、禁止C$、D$一类的缺省共享 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters AutoShareServer、REG_DWORD、0x0 6、禁止ADMIN$缺省共享 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters AutoShareWks、REG_DWORD、0x0 7、限制IPC$缺省共享 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa restrictanonymous REG_DWORD 0x0 缺省 0x1 匿名用户无法列举本机用户列表 0x2 匿名用户无法连接本机IPC$共享 说明:不建议使用2,否则可能会造成你的一些服务无法启动,如SQL Server 8、不支持IGMP协议 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters IGMPLevel REG_DWORD 0x0(默认值为0x2) 说明:记得Win9x下有个bug,就是用可以用IGMP使别人蓝屏,修改注册表可以修正这个bug.Win2000虽然没这个bug了,但IGMP并不是必要的,因此照样可以去掉。改成0后用route print将看不到那个讨厌的224.0.0.0项了。 9、设置arp缓存老化时间设置 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services:\Tcpip\Parameters ArpCacheLife REG_DWORD 0-0xFFFFFFFF(秒数,默认值为120秒) ArpCacheMinReferencedLife REG_DWORD 0-0xFFFFFFFF(秒数,默认值为600) 说明:如果ArpCacheLife大于或等于ArpCacheMinReferencedLife,则引用或未引用的ARP缓存项在ArpCacheLife秒后到期。如果ArpCacheLife小于ArpCacheMinReferencedL ife,未引用项在ArpCacheLife秒后到期,而引用项在ArpCacheMinReferencedLife秒后到期。每次将出站数据包发送到项的IP地址时,就会引用ARP缓存中的项。 10、禁止死网关监测技术 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services:\Tcpip\Parameters EnableDeadGWDetect REG_DWORD 0x0(默认值为ox1) 说明:如果你设置了多个网关,那么你的机器在处理多个连接有困难时,就会自动改用备份网关。有时候这并不是一项好主意,建议禁止死网关监测。 11、不支持路由功能 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services:\Tcpip\Parameters IPEnableRouter REG_DWORD 0x0(默认值为0x0) 说明:把值设置为0x1可以使Win2000具备路由功能,由此带来不必要的问题。 12、做NAT时放大转换的对外端口最大值 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services:\Tcpip\Parameters MaxUserPort REG_DWORD 5000-65534(十进制)(默认值0x1388--十进制为5000) 说明:当应用程序从系统请求可用的用户端口数时,该参数控制所使用的最大端口数。正常情况下,短期端口的分配数量为1024-5000。将该参数设置到有效范围以外时,就会使用最接近的有效数值(5000或65534)。使用NAT时建议把值放大点。 13、修改MAC地址 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ 找到右窗口的说明为"网卡"的目录, 比如说是{4D36E972-E325-11CE-BFC1-08002BE10318} 展开之,在其下的0000,0001,0002...的分支中找到"DriverDesc"的键值为你网卡的说明,比如说"DriverDesc"的值为"Intel 82559 Fast Ethernet LAN on Motherboard"然后在右窗口新建一字符串值,名字为"Networkaddress",内容为你想要的MAC值,比如说是"004040404040"然后重起计算机,ipconfig /all看看。 曾几何时,大家都有想过在命令行下改IP和网关。以前在NT4下实现起来过于麻烦,现在Windows 2000下的Netsh命令能实现该功能了。 Netsh 是本地或远程计算机的 Windows 2000 网络组件的命令行和脚本实用程序。为了存档或配置其他服务器,Netsh 实用程序也可以将配置脚本保存在文本文件中。 Netsh 实用程序是一个外壳,它通过附加的"Netsh 帮助 DLL",可以支持多个 Windows 2000 组件。"Netsh 帮助 DLL"提供用来监视或配置特定 Windows 2000 网络组件的其他命令,从而扩展了 Netsh 的功能。每个"Netsh 帮助 DLL"都为特定的网络组件提供了一个环境和一组命令。每个环境中都可以有子环境。例如,在路由环境中存在子环境 Ip 和 Ipx,它们将 IP 路由和 IPX 路由命令集中在一起。 Netsh 命令行选项包括下列各项: 用法: netsh [-a AliasFile] [-c Context] [-r RemoteMachine] [Command | -f ScriptFile] 下列指令有效: 此上下文中的命令: ? - 显示命令列表。 aaaa - 更改到 `aaaa` 上下文。 add - 将一个配置项添加到项目列表中。 delete - 在项目列表上删除一个配置项目。 dhcp - 更改到 `dhcp` 上下文。 dump 0 - 显示一个配置脚本。 exec - 运行一个脚本文件。 help - 显示命令列表。 interface - 更改到 `interface` 上下文。 ras - 更改到 `ras` 上下文。 routing - 更改到 `routing` 上下文。 set - 更新配置设置。 show - 显示信息 wins - 更改到 `wins` 上下文。 下列的子上下文可用: routing interface ras dhcp wins aaaa 若需要命令的更多帮助信息,请键入命令, 后面跟 ?。 -a AliasFile 指定使用了一个别名文件。别名文件包含 netsh 命令列表和一个别名版本,所以可以使用别名命令行替换 netsh 命令。可以使用别名文件将其他平台中更熟悉的命令映射到适当的 netsh 命令。 -c Context 指定对应于已安装的支持 DLL 的命令环境。 命令 指定要执行的 netsh 命令。 -f ScriptFile 指定运行 ScriptFile 文件中所有的 netsh 命令。 -r RemoteMachine 指定在远程计算机上运行 netsh 命令,由名称或 IP 地址来指定远程计算机。 您可以将命令缩写为意义明确的最短的字符串。例如,发布 sh ip int 命令相当于发布 show ip interface。Netsh 命令可以是全局的或特定环境的。全局命令可以在任何环境中发布,并用于一般的 Netsh 实用程序功能。特定环境的命令随环境而变化。您可以将发布的命令记录在日志文件中,以创建 netsh 命令会话的审核踪迹。 列出了 netsh 全局命令。 命令 说明 .. 上移一个环境等级。 ? 或 help 显示命令行"帮助"。 show version 显示 Windows 和 Netsh 实用程序的当前版本。 show netdlls 显示已安装的"Netsh 帮助 DLL"的当前版本。 add helper 添加"Netsh 帮助 DLL"。 delete helper 删除"Netsh 帮助 DLL"。 show helper 显示已安装的"Netsh 帮助 DLL"。 cmd 创建 Windows 2000 命令窗口。 online 将当前模式设置为联机。 offline 将当前模式设置为脱机。 set mode 将当前模式设置为联机或脱机。 show mode 显示当前模式。 flush 丢弃以脱机模式进行的任何更改。 commit 提交以脱机模式进行的更改。 set audit-logging 打开或关闭记录工具。 show audit-logging 显示当前的审核记录设置。 set loglevel 设置记录信息的级别 show loglevel 显示记录信息的级别。 set machine 配置执行 netsh 命令的计算机。 show machine 显示执行 netsh 命令的计算机。 exec 执行包括 netsh 命令的脚本文件。 quit 或 bye 或 exit 退出 Netsh 实用程序。 add alias 向现有命令添加别名。 delete alias 删除现有命令的别名。 show alias 显示所有已定义的别名。 dump 将配置写入文本文件。 popd 从堆栈中弹出环境的脚本命令。 pushd 将当前的环境推入堆栈的脚本命令。 Netsh 实用程序有如下命令模式: 联机 联机模式下,在 Netsh 命令提示符下发布的命令被立即执行。 脱机 脱机模式下,将在 Netsh 命令提示符下积累发布的命令,并通过发布 commit 全局命令来按照批处理方式执行。可以通过发布 flush 全局命令来丢弃积累的命令。 脚本 使用 -f 命令行选项,或在 Netsh 命令提示符下发布 exec 全局命令,可以执行指定文件中所有的 netsh 命令。 要创建当前配置的脚本,请使用 dump 全局命令。dump 命令根据 netsh 命令输出当前运行的配置。可以使用该命令创建的脚本来配置新的服务器或重新配置现有的服务器。如果要对组件的配置作很大的更改,推荐您使用 dump 命令开始配置会话,以防在进行更改前需要还原配置。 Interface 命令 下表列出了可在 Windows 2000 命令提示符下键入的 netsh 命令,这些命令用于管理运行 Windows 2000 Server 及"路由和远程访问"服务的计算机上的接口设置。如果对某个特殊功能有多个命令,则在每个命令之间用斜线 (/) 分隔。 当在命令提示符下键入命令时,请在每个命令前加上 netsh。要获得每个命令的精确语法,可在命令之后键入 ?。选项例如,要获得 netsh interface 命令的命令行"帮助",请在命令提示符下键入 netsh interface?。 命令 说明 interface set/show interface 启用、禁用、连接、断开连接以及显示请求拨号接口的配置。 interface set/show credentials 在请求拨号接口上配置或显示用户名、密码和域名。 ……… (省略二、三千字) 言归正传,现在来看看WIN2000下的网络设置的配置。 D:\>netsh netsh>interface interface>dump #======================== # 接口配置 #======================== pushd interface reset all popd # 接口配置结束 # ---------------------------------- # 接口 IP 配置 # ---------------------------------- pushd interface ip # "本地连接 2" 的接口 IP 配置 set address name = "本地连接 2" source = dhcp set dns name = "本地连接 2" source = dhcp set wins name = "本地连接 2" source = dhcp # "本地连接" 的接口 IP 配置 set address name = "本地连接" source = static addr = 192.168.1.10 mask = 255.255.255.0 set address name = "本地连接" gateway = 192.168.0.1 gwmetric = 1 set dns name = "本地连接" source = static addr = 192.168.0.1 set wins name = "本地连接" source = static addr = none popd # 接口 IP 配置结束 如果,你想快速修改一个本地IP地址。 你可以先用文本写入以下的内容: interface ip set address 本地连接 static 192.168.5.10 255.255.255.0 192.168.0.1 1 ^^^ ^^^ ^^^ ^^^ ^^ 接口名称 IP地址 子网掩码 网关 接口跃点数 如上保存为 local.sh D:\>netsh exec local.sh |
最近读者: