来源:自学PHP网 时间:2015-04-17 17:12 作者: 阅读:次
[导读] 一些windows 2008命令笔记doskey Command c:/doskey /history 列出所有历史命令F7 出现历史命令c:/doskey /reinstall 重新安装doskey并清除历史doskey /listsie = numberdoskey /......
一些windows 2008命令笔记
doskey Command
c:/>doskey /history 列出所有历史命令
F7 出现历史命令
c:/>doskey /reinstall 重新安装doskey并清除历史
doskey /listsie = number
doskey /listsize = number
c:/ doskey /listsize = 999 改变缓冲的大小,例如设定成999
生成 迷你的
doskey stpnl = sc stop netlogin
doskey sttnl = sc start netlogon
doskey macrokey = command
c:\doskey stpnl = sc stop netlogon
c:\>doskey sttnl = sc start netlogon
c:/>stpnl
c:/>sttnl
c:/>doskey /macros
start ocsetup
c:\>start ocsetup
dhcpservercore
c:\>start ocsetup
DHCPServerCore
netsh 命令是配置网卡
netsh interface ipv4 set address name
= 网卡静态配置IP和子网掩码
c:\> netsh interface ipv4 set address name = "local area connection" static 192.168.x.x 255.255.255.0
netsh interface ipv4 set address name = local area connection static 192.168.1.15 255.255.255.0
使用设定变量或者系统环境变量
例子 系统根目录
echo %systemroot%\sysvol
%systemroot%
%windir%
%programfiles%
%systemdrive%
%appdata%
%userdomain%
%logonserver%
%userprofile%
实例
set variable-name = value 创建一个变量
c:\>set myvariable =test
c:\>echo %myvariable%
c:/>ipconfig -flushdns
c:/>ipconfig /flushdns
c:/>ipconfig/flushdns
*正则表达式
c:\>dir *.txt
c:\>dir a*
c:\>dir a*.txt
?
c:\>dir week?.txt
Getting Help
assoc
attrib
bcdedit
call
cd or chdir
chkdsk
compact
convert
copy
date
del r erase
dir
chapter 3
Copy 命令是一个基础级的命令,你可以使用来拷贝多个文件到另外地方
xcopy 扩展级别的copy,你可以使用例如子目录的copy
robocopy 一个可以把权限属性一起复制
copy 源地址 + 源地址2 目的地址
实例
c:\>copy test.txt test2.txt
c:\copy test1.txt + text2 combined.txt
c:\data>copy *.*
c:\archive
比较文件命令
compact
c:/data>compact
cipher
...................................
共享文件
net share sharename = dirve:path
c:\>net share
c:\>net share data=c:\data
取消共享
Delete a share
/delete
c:/net share data /delete
创建共享时权限
/grant:user, [read | changc:e | full]
c:\>net share data=c:\data
/grant:darril,full
c:\>net share data=c:\data
/grant:"authenticated user",full
映射硬盘
c:\>net use
c:\net use z:\\fs1\public
/delete
c:\>net use z: /delete
/persistent 持久长连接使用
c:\>net use /persistent:No
c:\>net use /persistent:Yes
创建用户命令
net user username password /add
c:\>net user Darril P@ssw0rd /add
创建本地组
net localgroup groupname /add
c:\>net localgroup ITPros /add
创建域控制组
net group groupname /add
c:/net group ITPros \add
c:/>net group ITpros \add
添加用户到组
c:\>net localgroup "event log readers" darril \add
net localgroup "event log readers" ITpros \add
删除用户
net user username \delete
c:\>net user Darril \delete
删除本地组
net localgroup groupname \delete
Delete group on domain controller
net group grouopname \delete
c:>net group itpros \delete
改变NTFS 权限
c:\>icacls c:\data /gant darrilgibson:f
权限码 Description
F Full access
M Modify access
Rx Read and execute access
R Read-only access
W Write-only access
显示文件夹权限
c:\>icalcs c:\data
赋予某个用户权限
c:\
chapter 4
Batch file
md
cd
notepad
repadmin /syncall
c:/scripts>sync
chapter 5
DNS
/info
dnscmd [server] /info
c:\>dnscmd /info
c:\>dnscmd dcl /enumzones
c:\>dnscmd /enumzones
c:\>dnscmd dc1 \enumszones
.....................................
chapter 6
nslookup
进入了interactive mode
例如 web1.com
DNS 终端 直接找到pearson.pub
Pointer records(PTR)指向这个存在的命令
chapter 7
基本的命令
添加对象 dsadd
修改用户
移动
删除
。。。。。。。
chapter 10
chapter 25
window 2008 防火墙cmd 命令
c:\>netsh
netsh>advfirewall
netsh advfirewall->firewall
netsh advfirewall firewall->add rule name = "open port 6789" dir = in action = allow protocol = tcp localport = 6789
netsh advfirewall fire wall->delete rule name ="open port 6789"
c:\>netsh advfirewall firewall add rule name ="Open6789" dir = in action = allow protocol = tcp localport = 6789
c:\>netsh advfirewall firewall delete rule name = "Open6789"
net interface>? or help
netsh interface->6to4
netsh interface->ipv4
netsh interface->ipv6
netsh interface->tcp
netsh interface->teredo
netsh
interface->httpstunnel
netsh interface->portproxy
netsh interface->set
netsh interface->show
netsh interface->dump
chapter power shell
Get
get-command
PS C:\> get-command
Set
set-executionpolicy policy
PS c:\> set-executionpolicy remotesigned
Format
format-table columns
Out-file filename
Gridview
Get-service | out-gridview
PS c:\>get-service | where_object {$_.status -eq "rnning"}
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com