Last active
November 15, 2025 05:16
-
-
Save say2joe/33ba7c8f56a281ed3f9cc9d0d7171530 to your computer and use it in GitHub Desktop.
A decent list of useful CLI commands for Windows Terminal & console.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Useful Command-line Commands on Windows | |
| <a target="_new" href="https://serverfault.com/questions/3780/useful-command-line-commands-on-windows?rq=1">Reference from StackOverflow site</a> | |
| && - Command Chaining | |
| %SYSTEMROOT%\System32\rcimlby.exe -LaunchRA - Remote Assistance (Windows XP) | |
| appwiz.cpl - Programs and Features (Formerly Known as "Add or Remove Programs") | |
| appwiz.cpl @,2 - Turn Windows Features On and Off (Add/Remove Windows Components pane) | |
| arp - Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP) | |
| at - Schedule tasks either locally or remotely without using Scheduled Tasks | |
| bootsect.exe - Updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR | |
| cacls - Change Access Control List (ACL) permissions on a directory, its subcontents, or files | |
| calc - Calculator | |
| chkdsk - Check/Fix the disk surface for physical errors or bad sectors | |
| cipher - Displays or alters the encryption of directories [files] on NTFS partitions | |
| cleanmgr.exe - Disk Cleanup | |
| clip - Redirects output of command line tools to the Windows clipboard | |
| cls - clear the command line screen | |
| cmd /k - Run command with command extensions enabled | |
| color - Sets the default console foreground and background colors in console | |
| command.com - Default Operating System Shell | |
| compmgmt.msc - Computer Management | |
| control.exe /name Microsoft.NetworkAndSharingCenter - Network and Sharing Center | |
| control keyboard - Keyboard Properties | |
| control mouse(or main.cpl) - Mouse Properties | |
| control sysdm.cpl,@0,3 - Advanced Tab of the System Properties dialog | |
| control userpasswords2 - Opens the classic User Accounts dialog | |
| desk.cpl - opens the display properties | |
| devmgmt.msc - Device Manager | |
| diskmgmt.msc - Disk Management | |
| diskpart - Disk management from the command line | |
| dsa.msc - Opens active directory users and computers | |
| dsquery - Finds any objects in the directory according to criteria | |
| dxdiag - DirectX Diagnostic Tool | |
| eventvwr - Windows Event Log (Event Viewer) | |
| explorer . - Open explorer with the current folder selected. | |
| explorer /e, . - Open explorer, with folder tree, with current folder selected. | |
| F7 - View command history | |
| find - Searches for a text string in a file or files | |
| findstr - Find a string in a file | |
| firewall.cpl - Opens the Windows Firewall settings | |
| fsmgmt.msc - Shared Folders | |
| fsutil - Perform tasks related to FAT and NTFS file systems | |
| ftp - Transfers files to and from a computer running an FTP server service | |
| getmac - Shows the mac address(es) of your network adapter(s) | |
| gpedit.msc - Group Policy Editor | |
| gpresult - Displays the Resultant Set of Policy (RSoP) information for a target user and computer | |
| httpcfg.exe - HTTP Configuration Utility | |
| iisreset - To restart IIS | |
| InetMgr.exe - Internet Information Services (IIS) Manager 7 | |
| InetMgr6.exe - Internet Information Services (IIS) Manager 6 | |
| intl.cpl - Regional and Language Options | |
| ipconfig - Internet protocol configuration | |
| lusrmgr.msc - Local Users and Groups Administrator | |
| msconfig - System Configuration | |
| notepad - Notepad? ;) | |
| mmsys.cpl - Sound/Recording/Playback properties | |
| mode - Configure system devices | |
| more - Displays one screen of output at a time | |
| mrt - Microsoft Windows Malicious Software Removal Tool | |
| mstsc.exe - Remote Desktop Connection | |
| nbstat - displays protocol statistics and current TCP/IP connections using NBT | |
| ncpa.cpl - Network Connections | |
| netsh - Display or modify the network configuration of a computer that is currently running | |
| netstat - Network Statistics | |
| net statistics - Check computer up time | |
| net stop - Stops a running service. | |
| net use - Connects a computer to or disconnects a computer from a shared resource, displays information about computer connections, or mounts a local share with different privileges (documentation) | |
| odbcad32.exe - ODBC Data Source Administrator | |
| pathping - A traceroute that collects detailed packet loss stats | |
| perfmon - Opens Reliability and Performance Monitor | |
| ping - Determine whether a remote computer is accessible over the network | |
| powercfg.cpl - Power management control panel applet | |
| qfecheck - Shows installed Hotfixes applied to the server/workstation. | |
| quser - Display information about user sessions on a terminal server | |
| qwinsta - See disconnected remote desktop sessions | |
| reg.exe - Console Registry Tool for Windows | |
| regedit - Registry Editor | |
| rasdial - Connects to a VPN or a dialup network | |
| robocopy - Backup/Restore/Copy large amounts of files reliably | |
| rsop.msc - Resultant Set of Policy (shows the combined effect of all group policies active on the current system/login) | |
| runas - Run specific tools and programs with different permissions than the user's current logon provides | |
| sc - Manage anything you want to do with services. | |
| schtasks - Enables an administrator to create, delete, query, change, run and end scheduled tasks on a local or remote system. | |
| secpol.msc - Local Security Settings | |
| services.msc - Services control panel | |
| set - Displays, sets, or removes cmd.exe environment variables. | |
| set DIRCMD - Preset dir parameter in cmd.exe | |
| start - Starts a separate window to run a specified program or command | |
| start. - opens the current directory in the Windows Explorer. | |
| shutdown.exe - Shutdown or Reboot a local/remote machine | |
| subst.exe - Associates a path with a drive letter, including local drives | |
| systeminfo -Displays a comprehensive information about the system | |
| taskkill - terminate tasks by process id (PID) or image name | |
| tasklist.exe - List Processes on local or a remote machine | |
| taskmgr.exe - Task Manager | |
| telephon.cpl - Telephone and Modem properties | |
| timedate.cpl - Date and Time | |
| title - Change the title of the CMD window you have open | |
| tracert - Trace route | |
| whoami /all - Display Current User/Group/Privilege Information | |
| wmic - Windows Management Instrumentation Command-line | |
| winver.exe - Find Windows Version | |
| wscui.cpl - Windows Security Center | |
| wuauclt.exe - Windows Update AutoUpdate Client | |
| windowscommand-line-interfacewindows-command-prompt | |
| ============ USER COMMENTS: =========== | |
| getmac | |
| It shows the MAC address(es) of your network adapter(s). | |
| Screenshot of running getmac from a Windows commandline window. | |
| Share | |
| edited Mar 8, 2017 at 17:45 | |
| community wiki | |
| 3 revs, 2 users 78% | |
| splattne | |
| Very nice. When I run this on my laptop I get "ERROR: Not found.", however I can run getmac /? and it prints out the description / usage... ideas? – | |
| Zack Mulgrew | |
| CommentedMay 6, 2009 at 16:39 | |
| 5 | |
| ipconfig /all gives you this information in a less direct way too. – | |
| LeopardSkinPillBoxHat | |
| CommentedMay 11, 2009 at 6:56 | |
| Ha, now I've got your MAC address, prepare to be hackzored! – | |
| Peter Turner | |
| CommentedMay 15, 2009 at 22:02 | |
| 2 | |
| THANK YOU! No more ipconfig /all and scrolling around! "Happy dance!" – | |
| Gomibushi | |
| CommentedMar 24, 2010 at 20:41 | |
| Add a comment | |
| Report this ad | |
| 65 | |
| votes | |
| In the command prompt type: | |
| C:\> start . | |
| It opens the current directory in the Windows Explorer. | |
| Share | |
| edited Nov 3, 2011 at 9:05 | |
| community wiki | |
| 2 revs, 2 users 73% | |
| Toro | |
| 2 | |
| How neat. it works just like "ii ." in powershell. – | |
| dance2die | |
| CommentedMay 4, 2009 at 15:34 | |
| start . & exit is also good - I've got those set as s.cmd and sx.cmd respectively. Also x.cmd for exit, because yes I'm that lazy. – | |
| Mark Allen | |
| CommentedMay 5, 2009 at 21:01 | |
| 5 | |
| You could also do "explorer ." – | |
| Manuel Ferreria | |
| CommentedMay 9, 2009 at 17:14 | |
| 2 | |
| start actually works for any file type you can double-click on (word documents, xls files, etc) as well as drive mappings (not just the current working directory). – | |
| Kyle Burton | |
| CommentedMay 27, 2009 at 16:40 | |
| 5 | |
| Note that start can be a bit funny if you have files with spaces in their names. If start's first argument is quoted, it interprets it as a request to change the window title. So instead of running: start "My File.txt" you have to enter: start "" "My File.txt" This drove me nuts until someone explained it to me! – | |
| Ken Keenan | |
| CommentedJun 28, 2009 at 20:39 | |
| Show 2 more comments | |
| 50 | |
| votes | |
| Remote Desktop Connection | |
| mstsc.exe | |
| Opens: | |
| Some image demonstrationg the use of mstsc.exe. | |
| Share | |
| edited Jun 11, 2020 at 10:02 | |
| community wiki | |
| 3 revs, 2 users 74% | |
| Sung | |
| 16 | |
| Even better with the /v: switch. Just Win+R, then "mstsc /v:computer.fabrikam.com" – | |
| Portman | |
| CommentedMay 4, 2009 at 3:31 | |
| 9 | |
| renamed to /admin switch these days, and behaves quite differently in 2008+ – | |
| Oskar Duveborn | |
| CommentedMay 4, 2009 at 10:04 | |
| 17 | |
| don't forget the /span option for creating really big sessions across two monitors. – | |
| SqlACID | |
| CommentedMay 4, 2009 at 14:35 | |
| 6 | |
| Renamed back to /console in Vista SP1 and later, because they shouldn't have changed it in the first place. :) – | |
| Mark Allen | |
| CommentedMay 5, 2009 at 21:00 | |
| 7 | |
| While we're at it, I also often use /w: and /h: to manually set width and height. I'm particularly fond of running IIS Manager in 800x800 for some reason. – | |
| Portman | |
| CommentedMay 6, 2009 at 0:08 | |
| Show 7 more comments | |
| Report this ad | |
| 45 | |
| votes | |
| A list I use a lot: | |
| nbtstat - List NetBIOS stats and information | |
| netstat - List TCP/IP stats and information | |
| ipconfig - List TCP/IP configuration for a system | |
| netsh - Network configuration for a system | |
| sc - manage services | |
| net - whole slew of commands to manage users and groups, shares, connections, etc. | |
| ping - makes sure a system is up on the network | |
| tracert - trace the hops between two hosts. useful to see if there's a break in between and where it is. | |
| nslookup - Query DNS for information | |
| dcdiag - check health of the domain controller | |
| setspn - check SPNs for Kerberos configuration | |
| Share | |
| answered May 4, 2009 at 7:42 | |
| community wiki | |
| K. Brian Kelley | |
| sorry, what is the use of "sc"? – | |
| Alex. S. | |
| CommentedMay 9, 2009 at 5:26 | |
| 1 | |
| sc allows you to control services, and it allows you to do so remotely. This is different from net start/net stop, which run locally (albeit you can use psexec or something like that to get to a console on a remote system). sc will also query the service, etc. Basically everything you can do from services.msc you can now do from the command-line. technet.microsoft.com/en-us/library/cc754599.aspx – | |
| K. Brian Kelley | |
| CommentedMay 9, 2009 at 11:23 | |
| 1 | |
| netsh seems like a really powerful command, but I have not really been able to work with it. What do people really use it for? – | |
| railmeat | |
| CommentedAug 11, 2009 at 2:33 | |
| Add a comment | |
| 42 | |
| votes | |
| Services control panel: | |
| services.msc | |
| Share | |
| answered May 4, 2009 at 2:38 | |
| community wiki | |
| user640 | |
| find myself using this alot – | |
| Adyt | |
| CommentedMay 20, 2009 at 8:58 | |
| You can also type this (and the names of other MMC snap-ins) into the Run dialog. services.msc and compmgmt.msc are my most commonly used entries. – | |
| Coxy | |
| CommentedAug 11, 2009 at 6:57 | |
| You can use SC to manager services from the command prompt. Of course the venerable net command can start and stop services. – | |
| railmeat | |
| CommentedMay 2, 2010 at 2:09 | |
| Add a comment | |
| 40 | |
| votes | |
| shutdown.exe | |
| allow you to shutdown or reboot a machine. You can even reboot a remote machine with | |
| shutdown -m \\server -t 0 -r | |
| It even comes with a graphical user interface | |
| shutdown -i | |
| and you can abort a shutdown with | |
| shutdown -a | |
| Share | |
| answered May 5, 2009 at 20:30 | |
| community wiki | |
| Frode Lillerud | |
| Ouch, I don't think I will be trying this out often unless I do it on a VM ;) – | |
| dance2die | |
| CommentedMay 5, 2009 at 20:56 | |
| I use this at the end of my end-of-week script. – | |
| mmyers | |
| CommentedMay 15, 2009 at 21:09 | |
| This one's essential for us. We're an app group and our IT's centrally located out-of-state. We have local admin access to all of our servers and can reboot at will. It's not unusual for TS to choke when trying to shutdown and this is the only thing that we can use to kick things back into shape without calling an operator. – | |
| squillman | |
| CommentedMay 31, 2009 at 4:08 | |
| give it a -f as well to force all open apps to close – | |
| beakersoft | |
| CommentedDec 17, 2010 at 14:30 | |
| Add a comment | |
| 37 | |
| votes | |
| Robocopy is really useful. It mirrors directories. | |
| It is great for backups, restoring, and transferring large amounts of files. It only transfers files which have changed and can resume from where it left off. | |
| It comes standard in Windows Vista and later, but Windows XP users can get it as part of the Windows Server 2003 Resource Kit (free) or later. | |
| Share | |
| edited Nov 3, 2011 at 9:17 | |
| community wiki | |
| 2 revs, 2 users 75% | |
| thomasrutter | |
| Robocopy does so much more than mirror directories. It's freeking amazing! Any command-line tool that requires a word document to explain it rocks in my book. – | |
| WaldenL | |
| CommentedMay 5, 2009 at 19:25 | |
| 1 | |
| hehe. Well I guess it's a swiss-army-knife of command line copying, but with no GUI nonsense. – | |
| thomasrutter | |
| CommentedMay 6, 2009 at 1:33 | |
| +1; Robocopy, tar, split and gzip form basically all of our backup strategy. – | |
| RainyRat | |
| CommentedJun 21, 2009 at 0:21 | |
| @RainyRat: What, no 'at' command? – | |
| Dan Esparza | |
| CommentedSep 13, 2009 at 4:21 | |
| Is this the rsync of Windows? – | |
| Joey Adams | |
| CommentedJul 30, 2011 at 6:11 | |
| Show 1 more comment | |
| 34 | |
| votes | |
| (Not really a command per-se, but a way to get there.) | |
| For those of you that find yourself going to Start > Run > "cmd" a lot, you can cut down some steps. | |
| Say you want to get your IP address. You would normally go Start > Run > "cmd" [enter] then... | |
| ipconfig [enter] | |
| Now instead, go... | |
| Start > Run > "cmd /k ipconfig" | |
| This will run cmd and the command 'ipconfig', and it will keep the window open. So if I want to quickly get my MAC address (physical address), I'd do: | |
| cmd /k ipconfig /all | |
| ...all from the run menu in one line. | |
| All courtesy of BostonMark | |
| Share | |
| edited Nov 3, 2011 at 9:18 | |
| community wiki | |
| 2 revs, 2 users 84% | |
| Nick Devereaux | |
| Very cool, I am constantly doing Start>Run>Cmd to run various common commands and didn't know this shortcut. – | |
| Element | |
| CommentedMay 9, 2009 at 6:09 | |
| 3 | |
| Yes, the /k flag is definitely one of the best tips here. – | |
| Abraham Vegh | |
| CommentedMay 17, 2009 at 2:26 | |
| 10 | |
| Here's a better way: Go to START > All Programs > Accessories > Command Prompt, and right-click. Select Properties. Click the 'Short-cut' tab. Put the cursor in the 'Shortcut Key' field. Press [ctrl]-[alt]-t, it should say "Ctrl+Alt+T". Click OK. Now you can launch cmd.exe from anywhere anytime by hitting ctrl-alt-t. – | |
| Ryan Fisher | |
| CommentedJun 2, 2009 at 21:25 | |
| 5 | |
| Also, using windowskey+r gets you directly to the "Run..." window. – | |
| Andor | |
| CommentedMar 16, 2010 at 18:32 | |
| 1 | |
| How is this quicker or fewer keystrokes than opening cmd and typing the command? Seems to me two more keystrokes than the way you're proposing to replace. – | |
| harpo | |
| CommentedOct 3, 2010 at 5:27 | |
| Add a comment | |
| 28 | |
| votes | |
| The forgotten art: DOS String Manipulation! | |
| set mydate=%date:~10,4%_%date:~4,2%_%date:~7,2% | |
| echo %mydate% | |
| Output will be YYYY_MM_DD. | |
| Copy and paste this into a .bat file and be amazed! This is especially useful for creating backups, or any time/date series of directories and files. | |
| An example: | |
| @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 | |
| Share | |
| edited Nov 3, 2011 at 9:21 | |
| community wiki | |
| 2 revs, 2 users 86% | |
| Joseph Kern | |
| 5 | |
| This is dangerous as hell as the system locale display format changes the string that date returns and hence will thrash any script based on character position into an unpredictable mess if it ever changes. Which at least in Europe can easily happen by mistake or on purpose - I've had scheduled batch scripts do horrible things (or nothing) because of exactly this ^^ – | |
| Oskar Duveborn | |
| CommentedJun 13, 2010 at 11:23 | |
| Well ... I would hope that people wouldn't copy/paste/pray on production systems ... :-) Good point though. – | |
| Joseph Kern | |
| CommentedJan 25, 2011 at 0:42 | |
| Add a comment | |
| 26 | |
| votes | |
| tasklist.exe | |
| will list processes on local or a remote machine. | |
| tasklist.exe /S server | |
| It can display which Services the scvhost.exe processes are hosting with | |
| tasklist /SVC | |
| You can also do some filtering. This will display the processes on a remote machine that have used more than 15 minutes of CPU time | |
| tasklist /S server /FI "CPUTIME gt 00:15:00" | |
| Share | |
| answered May 5, 2009 at 20:49 | |
| community wiki | |
| Frode Lillerud | |
| 1 | |
| Don't forget it's counterpart taskkill – | |
| Chris S | |
| CommentedJul 8, 2010 at 3:39 | |
| Add a comment | |
| 25 | |
| votes | |
| control userpasswords2 | |
| Opens the classic User Accounts dialog: | |
| enter image description here | |
| Share | |
| edited Feb 20, 2012 at 8:49 | |
| community wiki | |
| 2 revs, 2 users 88% | |
| hmemcpy | |
| Add a comment | |
| 24 | |
| votes | |
| I find that I use findstr a lot to find stuff in logs, error files, etc. | |
| A simple example: in the log file ex0905.log we find all lines that have 2009-05-05 in them: | |
| findstr "2009-05-05" ex0905.log | |
| Share | |
| edited Dec 11, 2011 at 11:10 | |
| community wiki | |
| 2 revs, 2 users 76% | |
| Andrew Cox | |
| 1 | |
| findstr /s find recursively – | |
| Alex. S. | |
| CommentedMay 9, 2009 at 5:30 | |
| Put @findstr %* into a file named fs.bat in the PATH. – | |
| Lumi | |
| CommentedDec 2, 2011 at 19:57 | |
| Add a comment | |
| 22 | |
| votes | |
| Programs and Features (Formerly known as "Add or Remove Programs") | |
| appwiz.cpl | |
| Opens | |
| alt text | |
| Share | |
| edited Jun 11, 2020 at 10:02 | |
| community wiki | |
| 4 revs, 2 users 75% | |
| Sung | |
| Windows, then "fea" also isolates it well.. (But +1) – | |
| Ruben Bartelink | |
| CommentedMay 28, 2009 at 13:41 | |
| @Farseeker: I ran out of my 80G space as I was taking screenshot. Coudln't even spare a couple of megs at the time ;) – | |
| dance2die | |
| CommentedOct 13, 2009 at 0:19 | |
| You often need to do control appwiz.cpl - especially if you're doing it under runas (as you probably should be!) – | |
| Richard Gadsden | |
| CommentedAug 27, 2010 at 15:56 | |
| Add a comment | |
| 21 | |
| votes | |
| Sometimes I have to worry about too few free sessions for a Terminal Server connection to a server. | |
| quser displays information about user sessions on a terminal server. | |
| quser /SERVER:myserver | |
| Output | |
| 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 | |
| Sometimes it's even possible to find pure workaholics like appsuperuser :-) | |
| It's easier when pasting the quser executable from any 32-bit Server to my local System32 folder. | |
| Share | |
| edited Nov 3, 2011 at 9:27 | |
| community wiki | |
| 3 revs, 2 users 84% | |
| Ivo Looser | |
| What version of Windows is "quser" available? – | |
| dance2die | |
| CommentedMay 4, 2009 at 18:33 | |
| 6 | |
| Try using qwinsta instead, it's included by default in clients like XP as well... rwinsta can nuke the sessions – | |
| Oskar Duveborn | |
| CommentedMay 7, 2009 at 13:43 | |
| Add a comment | |
| 17 | |
| votes | |
| I use | |
| qwinsta | |
| to see disconnected remote desktop sessions and | |
| logoff | |
| to end them. | |
| It works on Windows 2000, Windows XP, Windows Vista, Windows Server 2003 and probably Windows Server 2008 (never tried). | |
| Share | |
| edited Dec 11, 2011 at 11:57 | |
| community wiki | |
| 2 revs, 2 users 72% | |
| Jim Harte | |
| you can use rwinsta to boot the remote session by id too! – | |
| Nick Kavadias | |
| CommentedMay 27, 2009 at 14:06 | |
| thats incredible. im impressed. – | |
| djangofan | |
| CommentedJul 6, 2010 at 21:05 | |
| Add a comment | |
| 16 | |
| votes | |
| systeminfo | |
| Displays a ton of information about the system at hand. The following are what it outputs on Vista: | |
| Host Name | |
| OS Name | |
| OS Version | |
| OS Manufacturer | |
| OS Configuration | |
| OS Build Type | |
| Registered Owner | |
| Registered Organization | |
| Product ID | |
| Original Install Date | |
| System Boot Time | |
| System Manufacturer | |
| System Model | |
| System Type | |
| Processor(s) | |
| BIOS Version | |
| Windows Directory | |
| System Directory | |
| Boot Device | |
| System Locale | |
| Input Locale | |
| Time Zone | |
| Total Physical Memory | |
| Available Physical Memory | |
| Page File | |
| Max Size | |
| Page File | |
| Available | |
| Page File | |
| In Use | |
| Page File Location(s) | |
| Domain | |
| Logon Server | |
| Hotfix(s) | |
| Network Card(s) | |
| Share | |
| edited Nov 3, 2011 at 9:29 | |
| community wiki | |
| 2 revs, 2 users 82% | |
| Peter Mortensen | |
| this is really useful. did not know this one – | |
| MikeJ | |
| CommentedAug 10, 2009 at 20:46 | |
| Add a comment | |
| 16 | |
| votes | |
| Computer Management | |
| compmgmt.msc | |
| Opens | |
| enter image description here | |
| Share | |
| edited Jun 11, 2020 at 10:02 | |
| community wiki | |
| 2 revs, 2 users 78% | |
| Sung | |
| Add a comment | |
| 15 | |
| votes | |
| Very useful one I only found out about recently: | |
| winver.exe | |
| Gives you a dialog box with the version of Windows the machine is running, complete with Service Pack level and build number. | |
| Share | |
| answered May 5, 2009 at 17:02 | |
| community wiki | |
| 17 of 26 | |
| 9 | |
| Note that I use the hotkey Win+Pause to see most of this information quickly on a box. – | |
| Matthew | |
| CommentedMay 27, 2009 at 20:29 | |
| Add a comment | |
| 14 | |
| votes | |
| There is still no mention of WMIC.exe :) | |
| Find whatever you want from remote machine, local machine... multiple machines. | |
| Nicely filled out HTML page with all data related to OS | |
| WMIC OS get /all /format:htable | |
| Look at all the options available | |
| 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. | |
| and many, many more. | |
| Share | |
| edited Feb 19, 2010 at 21:28 | |
| community wiki | |
| 2 revs, 2 users 98% | |
| KAPes | |
| @KAPes: "/format:htable" is awesome... – | |
| dance2die | |
| CommentedJun 27, 2009 at 13:09 | |
| Add a comment | |
| 13 | |
| votes | |
| color 02 | |
| This, my friends, is the only command you'll ever need. The rest is nonessential. | |
| Share | |
| answered May 11, 2009 at 7:50 | |
| community wiki | |
| dss_so | |
| 2 | |
| Oops, I accidentally entered color 23... – | |
| Andomar | |
| CommentedMay 16, 2009 at 19:26 | |
| entering 'color' by itself takes you back to default – | |
| RobW | |
| CommentedJun 16, 2010 at 20:16 | |
| Too bad it doesn't stick across CMD sessions... – | |
| Nate | |
| CommentedJul 29, 2010 at 20:56 | |
| Add a comment | |
| 13 | |
| votes | |
| Chaining commands, in particular net stop and start to restart any service: | |
| net stop w3svc && net start w3svc | |
| (It is a silly example as iisreset will do that, but anyway ;) | |
| Share | |
| edited Nov 3, 2011 at 9:29 | |
| community wiki | |
| 2 revs, 2 users 73% | |
| Oskar Duveborn | |
| 5 | |
| Just pointing out this is actually conditional execution, unlike a single '&'. ss64.com/nt/syntax-conditional.html – | |
| Christopher Galpin | |
| CommentedMay 22, 2009 at 19:25 | |
| True, it will only start if it the stop succeeded... or I guess that's the spirit anyway - not sure the net stop would actually return a non-success if it timed out.. testing – | |
| Oskar Duveborn | |
| CommentedMay 22, 2009 at 22:28 | |
| Well as it does both even if one tries to stop a non-existing service, in this case it doesn't seem to matter - but the difference is of course great. They should add that "promote comment to answer" feature and I'd promote yours ^^ – | |
| Oskar Duveborn | |
| CommentedMay 22, 2009 at 22:47 | |
| 3 | |
| This will ensure a metabase configuration change is saved, however. IISRESET does not. – | |
| K. Brian Kelley | |
| CommentedJun 10, 2009 at 16:03 | |
| Add a comment | |
| 12 | |
| votes | |
| explorer . | |
| Open explorer with the current folder selected. | |
| explorer /e, . | |
| Open explorer, with folder tree, with current folder selected. | |
| Share | |
| answered May 4, 2009 at 9:37 | |
| community wiki | |
| Richard | |
| This is also the way to make a shortcut that opens explorer for a specific directory, like "explorer /e,c:\myhomeisinrootthxu – | |
| Andomar | |
| CommentedMay 16, 2009 at 19:37 | |
| Already integrated higher up the vote count... – | |
| Ruben Bartelink | |
| CommentedMay 28, 2009 at 13:43 | |
| Add a comment | |
| 12 | |
| votes | |
| To change the title of the CMD window you have open, simply use: | |
| title [your new title] | |
| I've got a lot of CMD windows and other programs open at work. This command, combined with Taskbar Shuffle (allows you to drag taskbar items into new orders) has saved me from insanity. | |
| Share | |
| answered May 8, 2009 at 20:38 | |
| community wiki | |
| Steve Armstrong | |
| Add a comment | |
| 11 | |
| votes | |
| Windows 7 Run Commands | |
| I find it better to know where to find them until I have used them often enough to actually remember them. | |
| Share | |
| edited Jul 23, 2009 at 2:11 | |
| community wiki | |
| 2 revs, 2 users 75% | |
| p.campbell | |
| Thanks Jake. I was looking for a list like those. My initial goal was to be able to browse through answers and find whatever a user might think will need by skimming through screenshots. But I guess I could do that myself ;) – | |
| dance2die | |
| CommentedMay 4, 2009 at 14:25 | |
| Add a comment | |
| 10 | |
| votes | |
| To restart IIS | |
| iisreset | |
| Share | |
| answered May 4, 2009 at 14:26 | |
| community wiki | |
| Gulzar | |
| 3 | |
| This can also be used to restart IIS on a remote server: iisreset remoteservername – | |
| Saul Dolgin | |
| CommentedMay 27, 2009 at 17:58 | |
| 3 | |
| I don't use iisreset any longer. It may not save metabase config issue. I use net stop iisadmin /y && net start w3svc instead. Here's why: support.microsoft.com/default.aspx/kb/286196 – | |
| K. Brian Kelley | |
| CommentedJun 10, 2009 at 16:02 | |
| @K. Brian Kelley, pretty sure the /noforce command will prevent the forcing and therefore keep you safe. IIS 7 is probably immune to it anyway since it no longer 'technically' uses the metabase. – | |
| Ashley | |
| CommentedAug 3, 2011 at 21:07 | |
| Add a comment | |
| 10 | |
| votes | |
| I didn't see taskkill on the list yet. | |
| TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T] | |
| Parameter List: /S system Specifies the remote system to connect to. | |
| /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 | |
| it. | |
| Works great in conjunction with tasklist | |
| Share | |
| answered May 8, 2009 at 15:30 | |
| community wiki | |
| atom255 | |
| Add a comment | |
| 10 | |
| votes | |
| You can hit F7 in The Windows Command Line for a history of commands that you can choose with your keyboard. | |
| Also...I love this one - you can copy a file path by just dragging a file into the command line. | |
| Share | |
| edited Jun 24, 2009 at 19:17 | |
| community wiki | |
| 2 revs | |
| cop1152 | |
| Add a comment | |
| 10 | |
| votes | |
| On Windows XP at least (I haven't tried on Windows Vista and Windows 7): | |
| appwiz.cpl @,2 | |
| It takes you straight to the Add/Remove Windows Components pane. | |
| Another way to add or remove components in an automated fashion is to use | |
| sysocmgr.exe | |
| in unattended mode with a .inf file that lists the components you'd like to install. For example, | |
| [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 | |
| (Credit due to thesystemadministrator.com for .inf file.) | |
| It's a clunky tool (hey, it's MS), but it's invaluable for getting your components sorted out post-install. | |
| Share | |
| edited Nov 3, 2011 at 9:33 | |
| community wiki | |
| 3 revs, 2 users 89% | |
| user1804 | |
| 1 | |
| "appwiz.cpl @,2" works but renamed to "Turn Windows Features On and Off" – | |
| dance2die | |
| CommentedMay 4, 2009 at 23:39 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment