windows commands
change command prompt color :color , color 80,color fc
net user
net user h11h99 h11h99 /add --add a user
net localgroup administrators /add --add a user to the administrators
net user h11h99 h22h88 change the user's password to h22h88
view the LAN's machinae name:net view net view \\192.168.1.101
view all services on this server :net start
net start mssqlserver,net start oracleserviceh11h99
net stop mssqlserver net stop oracleserviceh11h99
net share h11h99=d:\h11h99
NET COMMANDS
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ] we can also use other command,for example sc
DESCRIPTION:
SC is a command line program used for communicating with the NT Service Controller and services. USAGE: sc <server> [command] [service name] <option1> <option2>... The option <server> has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc [command]" Commands: query-----------Queries the status for a service, or enumerates the status for types of services. queryex---------Queries the extended status for a service, or enumerates the status for types of services. start-----------Starts a service. pause-----------Sends a PAUSE control request to a service. interrogate-----Sends an INTERROGATE control request to a service. continue--------Sends a CONTINUE control request to a service. stop------------Sends a STOP request to a service. config----------Changes the configuration of a service (persistant). description-----Changes the description of a service. failure---------Changes the actions taken by a service upon failure. qc--------------Queries the configuration information for a service. qdescription----Queries the description for a service. qfailure--------Queries the actions taken by a service upon failure. delete----------Deletes a service (from the registry). create----------Creates a service. (adds it to the registry). control---------Sends a control to a service. sdshow----------Displays a service's security descriptor. sdset-----------Sets a service's security descriptor. GetDisplayName--Gets the DisplayName for a service. GetKeyName------Gets the ServiceKeyName for a service. EnumDepend------Enumerates Service Dependencies. The following commands don't require a service name:
sc <server> <command> <option> boot------------(ok | bad) Indicates whether the last boot should be saved as the last-known-good boot configuration Lock------------Locks the Service Database QueryLock-------Queries the LockStatus for the SCManager Database EXAMPLE: sc start MyService *.msc ,you can fint them in the system32 directory .if you use it better,you have made a lot progress!
notepad ,write ,winword ,calc,cls,chkdsk.convert,doskey,ftp,hostname,copy,xcopy,md,mkdir,rm,del
replace,rename,type,ftp......
regsvr32 --register or unregister acx
control --control panel
services.msc,lusrmgr.msc
regedit :register editor
gpedit.msc group policy editor
we can use ipsec to avoid virus attacking ,you sure that you have started the "IPSEC Servics" .
deny all the ports,allow the ports you can trust
WinKey +R you can run some commands ,for example cmd,services.msc and so on....
WinKey +E the windows's explorer
WinKey +M minium the windows
WinKey +L locking the screen when you leave
Alt + D the IE'S address will be selected
Alt +Tab you can change the window which you want
WinKy +Break show the properties of the computer
TELNET we can kill the session
On windows 2000,tlntadmn you can change the port ,start the service,stop the services
Because of the network interrupting,there are two session on the WIN2000 server.If you use the
third session to connect the server,the screen will display "the connect is full" .now we can use
the telnet solve the problem.
query session ,query process --find the explorer.exe process's SPID
use tskill kill the process exlorer.exe
If the telnet port is forbidden,we can use the other method.
If you have installed the Sql2000, can use the xp_cmdshell to solve it.
the principle is the same as that kill the process explorer.exe
On windows xp change the telnet port -- tlntadmn config port = 1023
用法: tlntadmn [computer name] [common_options] start | stop | pause | continue
| -s | -k | -m | config config_options 所有会话用 'all'。 -s sessionid 列出会话的信息。 -k sessionid 终止会话。 -m sessionid 发送消息到会话。 config 配置 telnet 服务器参数。
common_options 为:
-u user 指定要使用其凭据的用户 -p password 用户密码 config_options 为:
dom = domain 设定用户的默认域 ctrlakeymap = yes|no 设定 ALT 键的映射 timeout = hh:mm:ss 设定空闲会话超时值 timeoutactive = yes|no 启用空闲会话。 maxfail = attempts 设定断开前失败的登录企图数。 maxconn = connections 设定最大连接数。 port = number 设定 telnet 端口。 sec = [+/-]NTLM [+/-]passwd 设定身份验证机构 mode = console|stream 指定操作模式。 network
ipconfig /all ,release,renew DHCP
arp,route print,nslookup,nbtstat,telnet,tracert
netstat -n
ping -a -n 200 192.168.1.100
mstsc --mstsc /v 192.168.1.100:23145
1 38 ms 35 ms 35 ms 220.181.38.4
Trace complete.
Tracing route to www-china.l.google.com [64.233.189.104]
over a maximum of 30 hops: 1 51 ms 39 ms 39 ms hk-in-f104.google.com [64.233.189.104]
Trace complete.
netsh
C:\>netsh
netsh>int netsh interface>ip netsh interface ip>show address 接口 "VMware Network Adapter VMnet8" 的配置
DHCP 启用 否 IP 地址 192.168.30.1 子网掩码 255.255.255.0 InterfaceMetric 0 接口 "VMware Network Adapter VMnet1" 的配置
DHCP 启用 否 IP 地址 192.168.209.1 子网掩码 255.255.255.0 InterfaceMetric 0 接口 "本地连接" 的配置
DHCP 启用 是 InterfaceMetric 0 netsh interface ip>show
下列指令有效:
命令从 netsh 上下文继承:
show alias - 列出所有定义过的别名。 show helper - 请列出所有头等助手。 show mode - 显示当前的模式。 此上下文中的命令:
show address - 显示 IP 地址配置。 show config - 显示 IP 地址和更多信息。 show dns - 显示 DNS 服务器地址。 show icmp - 显示 ICMP 统计。 show interface - 显示 IP 接口统计。 show ipaddress - 显示当前 IP 地址 show ipnet - 显示 IP 的网络到介质的映射。 show ipstats - 显示 IP 统计。 show joins - 显示加入的多播组。 show offload - 显示卸载信息。 show tcpconn - 显示 TCP 连接。 show tcpstats - 显示 TCP 统计。 show udpconn - 显示 UDP 连接。 show udpstats - 显示 UDP 统计。 add address - 添加一个 IP 地址到指定的接口。
add dns - 添加一个静态 DNS 服务器地址。 add wins - 添加一个静态 WINS 服务器地址。 netsh interface ip>add address "本地连接" 192.168.1.120 255.255.255.0 192.168.1. 1 此命令提供的语法不正确。请查看帮助以获取正确的语法信息。 用法: add address [name=]<string> [[addr=]IP address [mask=]IP subnet mask] [[gateway=]IP address [gwmetric=]integer] 参数:
name - IP 接口的名称。
addr - 要添加到此接口的 IP 地址。 mask - 指定 IP 地址的 IP 子网掩码。 gateway - 指定 IP 地址的默认网关。 gwmetric - 默认网关的跃点数。 注释 : 把 IP 地址和默认网关添加到一个接口。 如果此接口已启用 DHCP,它将被停用。
示例: add address "Local Area Connection" 10.0.0.2 255.0.0.0
add address "Local Area Connection" gateway=10.0.0.3 gwmetric=2 第一个命令向本地连接接口添加一个静态 IP 地址 10.0.0.2,其子网掩码为 255.0
.0.0。第二个命令添加 IP 地址 10.0.0.3 作为网关跃点数为 2 的接口的第二个默认网关 DISK
diskpart,diskperf
dxdiag
shutdown -s -t 3600,on the windows server 2003(default six minutes)
Process
tasklist ,taskkill,taskmgr(xp or 2003)
query process,tskill(2000)
sysocmgr /i:sysoc.inf --open the windows compents panel
本文出自 “h11h99” 博客,请务必保留此出处http://h11h99.blog.51cto.com/230273/49919 |
|