Windows Command Line

  1. help
    Helps. Example help copy
  2. /?
    Same as help. Example copy /?
  3. dir
    list files and directories
  4. cd
    change directory.

    Example cd (folder)
  5. md
    make directory. Example md (name of new folder)
  6. rd
    remove directory.
  7. hostname
    The hostname command simply displays the name of the host at the command line. This can be a very useful utility when three or more remote console windows are open.
  8. format
    formats drive. Example C:\>format (name of drive):
  9. copy
    copies a file. Example copy (name of file) (new name)
  10. copy /v
    verify files and written correctly. copy /v (name of file) (new name)
  11. copy /y
    skips the prompt for overwriting. copy /y (name of file) (new name)
  12. xcopy
    copy files and directory trees.
  13. xcopy /s
    copy files in directory to new folder - xcopy /s (name of folder) (name of location to copy to)
  14. robocopy
    Robust copy. Example robocopy (path of directory you want to copy) (/E copies everything /S does not copy empty) (Path to folder)
  15. shutdown
    shutdown /s /t nn With /r will restart. Example shutdown /s /t (number of seconds)
  16. shutdown /a
    abort the current shutdown
  17. diskpart
    Diskpart (Disk Partitioning) provides command line access to disk and partition configuration settings.
  18. winver
    shows you what version of windows you are running.
  19. gpupdate
    Any changes made to Group Policy usually take effect during the login process. To update changes to a computer without going through the login process, it's common to run the gpupdate (Group Policy Update) command.

    Example: gpudate /target:(user) /force
  20. gpresult
    verify policy settings for user. Example gpresult /r for logged in user
  21. gpresult /user (username) /v
    Displays verbose policy information. This includes detailed settings that were applied with a precedence of 1.
  22. ipconfing
    ip information
  23. ipconfig /all
    Detailed IP information
  24. ping
    round trip time. Uses ICMP internet control message protocol. Example ping (IP Address)
  25. netstat
    • network statistics. Available on all operating systems.
    • netstat -a - shows all active connection
    • netstat -b - show binaries
    • netstat -n - do not show names
  26. nslookup
    Name server lookup, gives an IP address from the name. Example nslookup (name of site)
  27. net
    windows network information. Example net view \\(Name of server)
  28. net use drive: \\<servername>\<sharename>
    The Windows net use command is used to map a network share to a drive letter.
  29. tracert
    Traceroute, determines the route a packet takes to the destination. TTL= Time to live Example: tracert (IP address) , tracert -d (IP address but less information)
  30. pathping
    combine ping and tracert. Example pathping (IP address)
  31. sfc /scannow
    SFC (system file checker) utility will scan the integrity of all protected system files and replace any files that may be corrupted.
  32. chkdsk
    The chkdsk (Check Disk) command can fix logical file system error and locate and recover data from bad sectors on a hard drive.

    Example: chkdsk (name of drive): /f / chkdsk (name of drive): /r (repairs errors)

    SFC analyzes your system files while CHKDSK searches your hard drive
  33. arp
    address resolution protocol. Gives you the mac address from the IP. Example: arp -a
  34. route print
    view the device’s local routing table
  35. telnet
    login to devices remotely over tcp/23, unencrypted use SSH. Example telnet (IP address) (port number)
  36. nmap
    Network mapper, port scan for open ports, operating system scan, service scan. Example: nmap -F (IP address)
Author
dsagent
ID
362466
Card Set
Windows Command Line
Description
Windows Command Line. Basics.
Updated