这个Wiki的目标是促进使用一个命令来打开常用的应用程序,而不必经过许多鼠标点击 – 从而节省Windows机器的监视和故障排除时间。
答案条目需要指定
命令的快捷方式
一个鲜为人知的是
getmac
它显示您的networking适配器的MAC地址 。
在命令提示符下键入:
C:\> start .
它在Windows资源pipe理器中打开当前目录。
远程桌面连接
mstsc.exe
打开:
我用了很多的清单:
服务控制面板:
services.msc
shutdown.exe
允许您closures或重新启动机器。 你甚至可以重启远程机器
shutdown -m \\server -t 0 -r
它甚至还带有graphics用户界面
shutdown -i
你可以用中止关机
shutdown -a
Robocopy非常有用。 它镜像目录。
这对于备份,恢复和传输大量文件非常有用。 它只传输已经改变的文件,并可以从停止的地方恢复。
它在Windows Vista和更高版本中是标准的,但Windows XP用户可以将其作为Windows Server 2003资源工具包(免费)或更高版本的一部分。
(本质上不是一个命令,而是一个到达目的地的方法。)
对于那些发现自己要开始>运行>“cmd”的人,可以减less一些步骤。
假设你想获得你的IP地址。 你通常会去开始>运行>“cmd”[回车]然后…
ipconfig [enter]
现在呢,去…
开始>运行>“cmd / k ipconfig”
这将运行cmd和命令“ipconfig”,并将保持窗口打开。 所以如果我想快速获得我的MAC地址(物理地址),我会做:
cmd /k ipconfig /all
…全部来自一行中的运行菜单。
全部由BostonMark提供
被遗忘的艺术: DOSstring操作!
set mydate=%date:~10,4%_%date:~4,2%_%date:~7,2% echo %mydate%
输出将是YYYY_MM_DD
。
复制并粘贴到一个.bat文件,并感到惊讶! 这对于创build备份或任何时间/date系列的目录和文件特别有用。
一个例子:
@echo off :: Yes, this looks bad, but it works, it sets the file veriable mydate to YYYY_MM_DD. set mydate=%date:~10,4%_%date:~4,2%_%date:~7,2% echo Backing up DC1: :: start a new backup session, the /M switch is for the type of bakcup being performed, type ntbackup /? for more info start /wait ntbackup backup \\DC1\c$ /j "DC1 Backup" /f "C:\BAK\DC1\DC1_%mydate%.bkf" /M incremental echo DC1 is Done echo Backing up EXCH: start /wait ntbackup backup \\EXCH\c$ /j "EXCH Backup" /f "C:\BAK\EXCH\EXCH_%mydate%.bkf" /M incremental echo EXCH is Done echo Backing up FS1: start /wait ntbackup backup \\FS1\c$ /j "FS1 Backup" /f "C:\BAK\FS1\FS1_%mydate%.bkf" /M incremental echo FS1 is Done echo Backup was completed %date% %time% pause
tasklist.exe
将列出本地或远程机器上的进程。
tasklist.exe /S server
它可以显示scvhost.exe进程托pipe的服务
tasklist /SVC
你也可以做一些过滤。 这将显示已使用超过15分钟CPU时间的远程计算机上的进程
tasklist /S server /FI "CPUTIME gt 00:15:00"
control userpasswords2
打开传统的“用户帐户”对话框:
我发现我用findstr
很多东西在日志,错误文件等
一个简单的例子:在日志文件ex0905.log
我们find所有其中包含2009-05-05
行:
findstr "2009-05-05" ex0905.log
程序和function(以前称为“添加或删除程序”)
appwiz.cpl
打开
有时我不得不担心terminal服务器与服务器连接的自由会话太less。
quser
在terminal服务器上显示有关用户会话的信息。
quser /SERVER:myserver
产量
C:\Documents and Settings\sysmanager01>quser /SERVER:serverx USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME usr_hot1 1 Disc none 30.04.2009 17:59 usr_hot 2 Disc none 30.04.2009 18:01 appsuperuser rdp-tcp#6 3 Conn . 01.01.1601 02:00
有时甚至有可能find像appsuperuser
这样纯粹的工作狂:-)
将quser可执行文件从任何32位服务器粘贴到本地System32文件夹时,将会更加轻松。
我用
qwinsta
查看断开的远程桌面会话和
logoff
结束他们。
它适用于Windows 2000 , Windows XP , Windows Vista , Windows Server 2003和Windows Server 2008 (从未尝试过)。
systeminfo
显示大量关于系统的信息。 以下是在Vista上输出的内容:
计算机pipe理
compmgmt.msc
打开
非常有用的一个我最近才发现:
winver.exe
为您提供一个对话框,其中包含正在运行的Windows版本,并包含Service Pack级别和内部版本号。
仍然没有提及WMIC.exe 🙂
从远程机器,本地机器…多台机器find你想要的。
所有与操作系统相关的数据都填好了HTML页面
WMIC OS get /all /format:htable
看看所有可用的选项
ALIAS - Access to the aliases available on the local system BASEBOARD - Base board (also known as a motherboard or system board) management. BIOS - Basic input/output services (BIOS) management. BOOTCONFIG - Boot configuration management. CDROM - CD-ROM management. COMPUTERSYSTEM - Computer system management. CPU - CPU management. CSPRODUCT - Computer system product information from SMBIOS. DATAFILE - DataFile Management. DCOMAPP - DCOM Application management. DESKTOP - User's Desktop management. DESKTOPMONITOR - Desktop Monitor management. DEVICEMEMORYADDRESS - Device memory addresses management. DISKDRIVE - Physical disk drive management. DISKQUOTA - Disk space usage for NTFS volumes. DMACHANNEL - Direct memory access (DMA) channel management. ENVIRONMENT - System environment settings management. FSDIR - Filesystem directory entry management. GROUP - Group account management. IDECONTROLLER - IDE Controller management. IRQ - Interrupt request line (IRQ) management. JOB - Provides access to the jobs scheduled using the schedule service. LOADORDER - Management of system services that define execution dependencies. LOGICALDISK - Local storage device management. LOGON - LOGON Sessions. MEMCACHE - Cache memory management. MEMLOGICAL - System memory management (configuration layout and availability of memory). MEMPHYSICAL - Computer system's physical memory management. NETCLIENT - Network Client management. NETLOGIN - Network login information (of a particular user) management. NETPROTOCOL - Protocols (and their network characteristics) management. NETUSE - Active network connection management. NIC - Network Interface Controller (NIC) management. NICCONFIG - Network adapter management. NTDOMAIN - NT Domain management. NTEVENT - Entries in the NT Event Log. NTEVENTLOG - NT eventlog file management. ONBOARDDEVICE - Management of common adapter devices built into the motherboard (system board). OS - Installed Operating System/s management. PAGEFILE - Virtual memory file swapping management. PAGEFILESET - Page file settings management. PARTITION - Management of partitioned areas of a physical disk. PORT - I/O port management. PORTCONNECTOR - Physical connection ports management. PRINTER - Printer device management. PRINTERCONFIG - Printer device configuration management. PRINTJOB - Print job management. PROCESS - Process management. PRODUCT - Installation package task management. QFE - Quick Fix Engineering. QUOTASETTING - Setting information for disk quotas on a volume. RECOVEROS - Information that will be gathered from memory when the operating system fails. REGISTRY - Computer system registry management. SCSICONTROLLER - SCSI Controller management. SERVER - Server information management. SERVICE - Service application management. SHARE - Shared resource management. SOFTWAREELEMENT - Management of the elements of a software product installed on a system. SOFTWAREFEATURE - Management of software product subsets of SoftwareElement. SOUNDDEV - Sound Device management. STARTUP - Management of commands that run automatically when users log onto the computer system. SYSACCOUNT - System account management. SYSDRIVER - Management of the system driver for a base service. SYSTEMENCLOSURE - Physical system enclosure management. SYSTEMSLOT - Management of physical connection points including ports, slots and peripherals, and TAPEDRIVE - Tape drive management. TEMPERATURE - Data management of a temperature sensor (electronic thermometer). TIMEZONE - Time zone data management. UPS - Uninterruptible power supply (UPS) management. USERACCOUNT - User account management. VOLTAGE - Voltage sensor (electronic voltmeter) data management. VOLUMEQUOTASETTING - Associates the disk quota setting with a specific disk volume. WMISET - WMI service operational parameters management.
还有很多很多
color 02
我的朋友们,这是你唯一需要的命令。 其余的是不重要的。
链接命令,尤其是net stop
并start
重新启动任何服务:
net stop w3svc && net start w3svc
(这是一个愚蠢的例子, iisreset
会这样做,但无论如何;)
explorer .
打开资源pipe理器并select当前文件夹。
explorer /e, .
打开资源pipe理器,文件夹树,select当前文件夹。
要更改已打开的CMD窗口的标题,只需使用:
title [your new title]
我有很多CMD窗口和其他程序在工作。 这个命令,结合Taskbar Shuffle(允许你拖动任务栏项目到新的命令),使我免于精神病。
Windows 7运行命令
我发现最好知道在哪里find他们,直到我经常使用它们来记住它们。
重新启动IIS
iisreset
我没有看到名单上的任务技能。
TASKKILL [/ S系统[/ U用户名[/ P [密码]]]] {[/ FIfilter] [/ PID processid | / IM imagename]} [/ F] [/ T]
参数列表:/ S system指定要连接的远程系统。
/U [domain\]user Specifies the user context under which the command should execute. /P [password] Specifies the password for the given user context. Prompts for input if omitted. /F Specifies to forcefully terminate process(es). /FI filter Displays a set of tasks that match a given criteria specified by the filter. /PID process id Specifies the PID of the process that has to be terminated. /IM image name Specifies the image name of the process that has to be terminated. Wildcard '*' can be used to specify all image names. /T Tree kill: terminates the specified process and any child processes which were started by
它。
与任务列表一起工作良好
您可以在“Windows命令行”中点击F7查看您可以使用键盘select的命令历史logging。
另外…我喜欢这个 – 你可以通过拖拽文件到命令行来复制文件path。
至less在Windows XP上(我没有在Windows Vista和Windows 7上试过):
appwiz.cpl @,2
它直接进入“添加/删除Windows组件”窗格。
以自动方式添加或删除组件的另一种方法是使用
sysocmgr.exe
在无人参与模式下使用.inf文件列出您想要安装的组件。 例如,
[NetOptionalComponents] SNMP = 1 [SNMP] Contact_Name = IT Dept. Location = Office Service = Physical, Applications, End-to-End Community_Name = Mormon Traps = server1, server2 Send_Authentication = Yes Accept_CommunityName = Public:Read_Only Any_Host = No Limit_Host = server1, server2
(由于systemadministrator.com对.inf文件的信任。)
这是一个笨重的工具(嘿,这是MS),但它是非常有价值的安装后,您的组件清理。
装置经理
devmgmt.msc
打开
registry编辑器
regedit