Windows CLI commands

Maciej
4 min readOct 30, 2019

--

Basic command :

  • bootcfg : This command line tool can be used to configure , test , change , or delete the boot entry settings in the BOOT.INI
  • defrag: Runs local disk defragmenter .
  • diskpart: This command allows you to manage disk partitions
  • driverquery: This allows the administrator to calculate and display the list of installed device drivers and their properties
  • fsutil: A very powerful tool . It allows among other things, limit the number of seats for each user . More about this option, you will be running it
  • getmac: This command line tool enables an administrator to display the MAC address for the network card in the system.
  • gpresult: This command line tool displays the Resultant Set of Policy RSoP for the target user and the computer.
  • netsh: A very powerful tool for configuring the network .
  • openfiles: This allows the administrator to display or disconnect open files and folders on your system.
  • recover: Recovers readable information from a damaged disk.
  • reg: Console Registry Tool for Windows.
  • schtasks: Enables an administrator to create , delete, query , change, run and end scheduled tasks on a local or remote system . Replaces AT.exe program .
  • sfc: It scans protected system files and replaces incorrect versions of files with correct Microsoft versions
  • shutdown: Allows remote reboot or shutdown. More about this option, you will be entering it on the command line .
  • systeminfo: Displays information about the configuration of your computer .
  • tasklist: This command line tool displays a list of applications and associated tasks / processes currently running on local or remote system .
  • taskkill: This command line tool can be used to end one or more processes. Processes can be killed by process ID or image name .Additional commands
  • assoc: Displays or modifies file extension associations
  • at: Schedules commands and programs
  • attrib: Displays or changes file attributes
  • break: Disables or enables extended CTRL + C
  • cacls: Displays or modifies access control lists ( ACLs) of files
  • call: Calls one batch program from another
  • cd: Displays or changes the current directory name
  • chcp: Displays or sets the active code page number
  • chdir: Displays or changes the current directory name
  • chkdsk: Checks a disk and displays a status report
  • chkntfs: Displays or modifies the checking of disk at boot
  • cls: Clears the screen
  • cmd: Starts a new instance of the Windows command interpreter
  • color: Sets the default background color and foreground console
  • comp: Compares the contents of two files or sets of files
  • compact: Displays or alters the compression of files on NTFS partition
  • convert: Converts FAT volumes to NTFS volumes can not be converted current drive
  • copy: Copies one or more files to another location
  • date: Displays or sets the date
  • del: Deletes one or more files
  • disk: Displays a list of files and subdirectories
  • diskcomp: Compares the contents of two floppy disks
  • diskcpy: Copies the contents of one floppy disk to another
  • doskey: Edits command lines, recalls Windows commands, and creates macros
  • echo: Displays messages and enables or disables the echo command
  • endlocal: Ends local environment changes in a batch file
  • erase: Deletes one or more files
  • exit: Quits CMDEXE ( command interpreter )
  • fc: Compares two files or sets of files and displays the differences betweenthem
  • find: Searches for a text string in a file or files
  • findstr: Searches for strings in files
  • for: Runs a specified command for each file in a set of files
  • format: Formats a disk for use with Windows
  • ftype: Displays or modifies file types used in the extension associations file
  • goto: Transfers control to the Windows command interpreter to a row a labeled line in a batch file
  • gaftabl: Enables Windows to display an extended character set in graphics mode
  • help: Provides information for Windows commands
  • label: Creates, changes, or deletes the label (labels ) disk volume
  • md: creates a directory
  • mkdir: creates a directory
  • mode: Configures system devices
  • more: Displays one screen at
  • move: Moves one or more files from one directory to another
  • path: Displays or sets a search path for executable files
  • pasu: Suspends processing of a batch file and displays a message
  • popd: Restores the current directory saved by Pushd
  • print: Prints a text file
  • prompt: Changes the prompt command line Windows
  • pushd: Saves the current directory then changes it
  • rd: removes a directory
  • recover: Recovers readable information from a damaged disk
  • rem: This means comments in a batch file or a file CONFIGSYS
  • rhenium: Renames a file or files
  • rename: Renames a file or files
  • replace: converts files
  • rmdir: removes a directory
  • set: Displays , sets, or removes Windows environment variables
  • setlocal: Enter the local environment changes in a batch file
  • shift: Changes the position of replaceable parameters in a batch file
  • sort: Sorts input
  • start: Runs a program or command in a separate window
  • subst: Assigns a drive letter path
  • time: Displays or sets the system time
  • title: Sets the window title for a session CMDEXE
  • tree: Displays the directory structure of a drive or path
  • type: Displays the contents of a text file
  • ver: Displays the version of Windows
  • veryfi: Tells Windows whether to verify that your files are written correctly to disk
  • vol: Displays a label and serial number of the drive
  • xcopy: Copies files and directories

--

--

Maciej
Maciej

Written by Maciej

DevOps Consultant. I’m strongly focused on automation, security, and reliability.

No responses yet