0% found this document useful (0 votes)
11 views

Windows Commands

Windows command to learn

Uploaded by

cebelex847
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Windows Commands

Windows command to learn

Uploaded by

cebelex847
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Basic Windows CMD Commands

Ver – displays operating system version on the screen (e.g., Microsoft Windows [Version 10.0.19045.2486])

Date – displays the current date on the screen. Can also be used to change the date.

Shutdown – shuts down your machine.

Taskkill – allows you to terminate a process or a running app. To use this, type in taskkill followed by ‘/f’,
‘/im’, and the name of the process or app you want to terminate (e.g. winword.exe). So, if we want to kill all
instances of MS Word, we would need to type in taskkill /f /im winword.exe. Hit Enter to confirm.

Color – changes the color of the foreground and background. For instance, typing in ‘color fc’ will make the
background bright white and the foreground (i.e., writing) light red.

Getmac – displays your machine’s MAC address.

Ipconfig – displays your IP address.

Ping – sends data packets to a specific IP address or network (e.g., ping google.com). Very useful in
troubleshooting Internet connectivity issues.

Pathping – maps the connection to a specific IP address. Can also be used to troubleshoot connectivity
issues.

Nslookup – displays the DNS record or IP address of a specific domain (e.g., nslookup facebook.com).

Chkdks – performs a routine check on a specified disk and corrects errors.

Gpupdate – updates group policies. Usually used in conjunction with the force (/f) argument.

Mkdir – creates a new directory.

Tasklist – displays a list of all live processes and applications.


Timeout – very useful when working with batch files. This command allows you to delay execution for a
specified number of seconds. When appended the -1 value, process execution will be delayed indefinitely.
The computer will wait for a keystroke to continue.

Type – this command allows you to view text files (.txt) in your cmd window.

Vol – displays disk volume information such as serial numbers or labels.

Systeminfo – displays useful sys info such as Host Name, OS version, processor, BIOS version, time zone,
applied hotfixes, and more.

Netstat -– displays info about active TCP connections.

Help – outputs a list of commonly used commands.

Advanced Windows CMD Commands

And now it’s time to lose the kid gloves and talk about some more advanced (and cool) CMD commands.

Telnet – allows you to establish a remote, Telnet-type connection.Before attempting to ‘dial’, ensure that
both machines support Telnet communication and that the client software is installed.To initiate this type of
remote session, you must specify the IP address of the server or the main computer followed by 13531 (e.g.
telnet 60.227.102.16 13531). The number at the far end of the command represents the communication port
used by the Sage 50 Connection Manager.If the setup’s done right, your CMD cursor should become blank.
Otherwise, it will return the message “telnet is not recognized as an internal or external command, operable
program, or batch file”. This error message appears when Telnet’s not enabled on the machine.To switch it
on, click on the Start button and head to Control Panel. Under Programs and Features, select Turn Windows
Features on or off.Scroll down until you see Telnet Client and Telnet Server. Enable both features and click
the Ok button to confirm. Restart your machine. Open a new CMD window and retry the connection.

Klist – this command allows you to visualize cached Kerberos tickets and retrieve useful information such
as encryption type, server, start time, renew time, session key type, cached flags, and more.

FC – changes made to files may not always be obvious.To see if a file has been modified, use the File
Compare (FC) command in CMD. You can perform two kinds of file comparisons: ASCII or binary.For
instance, you may want to use an ASCII-type comparison when working with a text file. On the other hand,
for media (e.g. pictures, clips, etc.) a binary comparison would be the proper approach.

Powercfg – this is a great diagnostic tool for laptop users.Ever wondered why your battery’s running out so
fast, leaving you high and dry, possibly in the middle of an (important) e-meeting? Well, you can quickly
find out by running this Power Configuration utility in CMD. Powercfg usually works best with the ‘-
energy’ argument.So, after running the combo ‘powercfg -energy’, your machine will begin a 60-second
power test. It will generate a power efficiency diagnostic report. If any errors are found, they will be
highlighted in the second section of the report, along with recommendations.

Cacls – this nifty command allows you to display or modify ACLs (i.e. Access Control Lists) of various
files.Some of its more popular uses include granting specific access rights to users (i.e. Read, Write, Change,
or Full Control), revoking permissions, denying specific users, or replacing the user’s access rights. Here’s a
quick example of how to use the Cacls command.

Step 1. Create a text document on your desktop area. Name it ‘test.txt’

Step 2. Open CMD.

Step 3. Navigate to the Desktop directory by typing in ‘cd desktop’

Step 4. Type in ‘cacls test.txt’. This will display users and permissions.

Step 5. In this example, we will update (replace) the default rights of user BUILTIN\Administrators from F
(i.e. Full Control) to R (i.e. Read only) using the /P argument.

Step 6. Type in ‘cacls test.txt /P BUILTIN\Administrators: R

Step 7. Type ‘Y’ and press Enter to confirm changes.

6. ARP – display or commit changes to the ARP cache.


To view the contents of the cache, type in ARP -a and press ENTER. If you want to make changes to the
ARP cache such as adding a static entry use ARP-a, followed by the Internet address (i.e. IP) and the
physical address (i.e. MAC). For instance, if we have a new host and want to associate its IP to its physical
address, we will need to type in the following line: ARP-a [IP_address] [Physical_Adress].
7. Chgport – use this command to display or remap COM ports.

8. Cipher -– check the encryption status of your files or folders (i.e., NTFS partitions only).

9. Cmdkey – displays and allows you to make modifications to all host-stored passwords and usernames.

10 Dispdiag – allows you to diagnose display-related issues. Can create log dump files when used together
with the [-d] argument.

11. Driverquery – displays a list of all the drivers installed on the machine.

12. Fondue – install optional MS Windows updates from CMD.

13. Hwrcomp – this command allows you to install or update existing handwriting recognition dictionaries.

14. Makecab – used to compress files and folders.

15. Mrinfo – displays router interface info.

16. Pentnt – this command allows to user to detect so-called floating-point division errors in Pentium
processors.

17. Reagentc – use this command to configure the Windows Recovery Environment.

18. Recover – retrieve data from a bad disk.

19. Repair-bde – useful in decrypting/repairing a damaged drive that’s been encrypted with BitLocker.

20. Runas – execute an application with another user’s credentials.

21. Chgusr – modify the install mode for your terminal server.

22. Cmstp – used to install or uninstall a service profile for the Connection Manager.

23. Ctty – modify the default input or output devices.


24. Forfiles – Selects and executes a command on a file or set of files.

25. Format – Prepares a disk for use with Windows, by formatting it.

26. Fsutil – Performs tasks related to file allocation table (FAT) and NTFS file system, such as managing
reparse points or sparse files.

27. Ftp – Transfers files to and from a remote network site using the File Transfer Protocol.

28. Getmac – Displays the Media Access Control (MAC) address for network adapters.

29. Goto – Directs the Command Prompt to a labeled line in a batch program.

30. Gpresult – Displays Group Policy information for a machine or user.

31. Gpupdate – Refreshes local and Active Directory-based Group Policy settings, including security
settings.

32. Graftabl – Enables the ability to display an extended character set in graphics mode.

33. Hostname – Displays the host name portion of the full computer name of the computer.

34. Icacls – Displays or modifies discretionary access control lists (DACLs) on specified files.

35. If – Performs conditional processing in batch programs.

36. Ipconfig – Displays all current TCP/IP network configuration values and refreshes Dynamic Host
Configuration Protocol (DHCP) and Domain Name System (DNS) settings.

37. Iscsicli – Starts the Microsoft iSCSI Initiator, used to manage iSCSI.

38. Klist – Displays or deletes Kerberos tickets.

39. Ktmutil – Starts Kernel Transaction Manager Utility.


40. Label – Creates, changes, or deletes the volume label of a disk.

41. Lodctr – Updates registry values related to performance counters.

42. Logman – Manages and schedules performance counter and event trace log collections on local and
remote systems.

43. Logoff

44. shutdown /s

45. tasklist

46. taskkill /f /im [process name]

taskkill /f /pid [process ID]

47. chkdsk /f

48. sfc /scannow

format [drive letter]: /fs:[file system] /q

format h: /fs:ntfs /q

49. diskpart

50. cd [path to folder]

51. copy [path\file.ext] [path\newfile.ext]

copy digitalcitizen.txt test.txt

52. del
53. ipconfig /all

ping

ping digitalcitizen.life

54. tracert [IP address or hostname]

tracert digitalcitizen.life

55. netsh wlan show profiles

and

netsh wlan show profile name=WiFi_SSID key=clear

56. cls

57. Help

help [command]

You might also like