windows commands

  1. What Windows command provides info about NetBIOS statistics & resolves NetBIOS names?
    Nbtstat
  2. what windows command displays TCP/IP statistics, currently established network connections, port on which TCP/IP service is running, & packets handled by the interface?
    • Netstat
    • -a - lists TCP/UDP connections
    • -e - displays details about packets
    • -s - provides statistics about each packet transmitted
  3. What Windows XP command displays the amount of free disk space on a volume?  what command is used to dismount a volume?
    fsutil volume [diskfree] [dismount] "drive letter"

    use "fsutil fsinfo drives" to print a list of drives on a system
  4. What windows command is used to configure and manage RAID?
    DiskRAID
  5. What windows command can be used to mount a virtual hard disk?
    • Diskpart > select vdisk [path to vdisk]
    • Diskpart > attach vdisk [readonly]
  6. What windows command is used to search for & list objects in an active directory server?
    Dsquery
  7. What windows command can add or change a drive letter of a volume?
    Diskpart > assign letter = [letter]

    if assin is used by itself, windows assigns the next available letter for the drive.

    must select disk using select disk & select partition or select volume before using this command.
  8. What windows command can be used to reducte the size of a virtual had disk?
    • Diskpart > select vdisk [vdisk]
    • diskpart > compact vdisk

    this command is useful because VHDs do not automatically decrease in size as you delete files.
  9. what windows zp command displays a disk's volume label?  what command changes a volume's label?
    • 1.) vol [drive]
    • 2.) label [volume]
  10. what windows commands can create and delete partitions, volumes, & vdisks respectively?
    • diskpart > create [partition / volume / vdisk]
    • diskpart > delete [partition / volume / vdisk]
  11. What windows command can be used to extend the size of a volume / partition?
    Diskpart > Extend [size = <# to add>]

    if size is not specified, all contiguous free space is used on sleected disk
  12. What windows command is used to manage DNS servers?
    DNScmd
  13. What windows command recalls previously entered command-line commands?
    Doskey /history or /h
  14. What windows command isplays a list of installed drivers & their properties?
    Driverquery
  15. What windows command is used to display or set the SAN policy for the OS?
    Diskpart > SAN
  16. What windows command is used to list events from event logs?
    Eventquery
  17. What windows command is used to connect a computer to a shared resource?
    Net use "mount point | *" "\\computer name\share" "password | *" /user:"username" /delete

    mount point is optional, use * to mount automatically

    use /delete to disconnect from share

    username & password are optional, depending on the share
  18. What windows command can be used to manage shared resources on a network by a computer?
    Net share "sharename=Drive:path" /users:"number" | unlimited

    /users = # of users that can access share simultaneously

    /delete = stop sharing resource

    using net share by itself displays info about all resources shared on a computer.
  19. What windows command can be used to display info about the selected disk, partition, volume, or VHD?
    Diskpart > detail [disk / partition / volume / vdisk]
  20. What windows command is used to expand the size fo a VHD?
    Diskpart > expand vdisk
  21. What windows command can be used to copy a file?
    Copy "file1" "Distination / file 2"

    • /y - suppress prompting to confirm overwrite
    • /-y - ask for confirmation
  22. What windows command can be used to format a partition / volume?
    • Diskpart > format [fs = ntfs | fat | fat32]
    • [label = "label"] [quick]

    • fs = filesystem to use
    • label - label for the volume
    • quick = quick format
  23. what windows command is used to change permissions in the ACL in active directory domain services?
    Dsacls
  24. what windows command can be used to change a disk from one type to another?
    Diskpart > convert [Basic / Dynamic / Gpt / mbr]

    • basic - converts selected disk to basic
    • Dynamic - convert to dynamic
  25. What command can be used to compare 2 files or sets of files in windows?
    • fc "file 1 " "file 2"
    •   - or -
    • comp "file 1 "  "file 2"


    • /a - display differences as characters
    • /c - non-case sensitive comparison
    • /n = <number> - compare lines that are specified for each file.
  26. What windows command displays the contents of a text file?
    Type
  27. What windows command will allow you to open a command prompt as an admin?
    runas /user:"localmachinename" \ administrator cmd

    local machine name = name of computer

    administrator can be replaced with usernameof user you want to use

    /no profile - user's profile is not loaded, faster load times, may cause malfunction in some applications.
  28. What windows command makes a volume or disk read only or hidden?
    Diskpart > attributes volume/disk [set/clear] [attribute]

    volume / disk - use volume to modify volume selected or disk to modify disk of volume.

    set / clear - set or clear an attribute

    attribute - can be hidden, read only, nodefault, driveletter, or shadowcopy

    must select disk using select disk/volume before hand.
  29. What windows command can be used to schedule tasks & commands to run?
    Schtasks
  30. What windows command displays a list of all disks, partitions, or volumes attached.
    Diskpart > list [partition / volume / disk]
  31. What windows command is used to modify network configuration of a computer?
    Netsh
  32. What windows command is used to moutn NFS network sahres?
    mount [-o anon] [-u:username] [p:password|*] \\"computername"\"sharename" [Devicename|*]

    must have client for NFS installed to use this command

    can only unmount using the unmount command, net use will not remove the directory.

    mount used by itself lists all mounted connections.
  33. What windows command displays properties of an object in an active directory server?
    Dsget
  34. What windows command can be used to check & repair disk problems?
    chkdsk [drive:]

    • /f - fix file system errors
    • /r - scan for & attempt recovery of bad sectors, implies F
  35. What 2 windows commands are used to move to a specific folder?
    • CD
    • Chdir
  36. What windows command is used to remove an object from an active directory server?
    Dsrm
  37. What windows command locates new disks that have been added to the system?
    Diskpart > rescan
  38. What windows command is used to remove all partition & volume formatting from a disk?
    • Diskpart > select disk [disk]
    • diskpart > clean

    cleans all formatting from selected disk
  39. what windows command can be used to change owner of a file / folder?
    Icacls "file/folder" /setowner "user"

    • /T - includes subfolders /files
    • /c - continue on errors
    • user can be user, group, or SID
  40. What windows command is used to add, modify, or display user account info?
    net user "username" "password"

    using netuser by itself will list all user accounts

    using net user "user" displays info about the user.
  41. What windows command is used to add, modify, or dispaly groups info?
    net group "groupname"

    "net group" - displays all groups on computer

    "net group 'group'" - displays all users in a group
  42. what windows command is used to logoff, shutdown, or restart a computer?
    Shutdown

    • -l = logoff
    • -s = shutdown
    • -r = reboot
    • -f = force close shutdown
  43. What windows command can be used to display a list of files in folders & subfolders?
    Dir [path]

    • /p - display 1 screen at a time
    • /q - display ownership info
    • /a - displays hidden files/folders
    • /o - sort, use n=name, s=size, d= date
  44. CIPHER [/e l/d] [options] [path]
    • /e - encrypt 
    • /d - decrypt
    • /s - applies to subfolders & files
  45. what windows command makes a directory?
    what command removes a directory? 
    what command moves a file?
    • 1.) mkdir or md
    • 2.) rmdir or rd
    • 3.) move
  46. what windows command displays details about computer hardware config, components, & software?
    msinfo32 or systeminfo
  47. what windows command is used to print a file?  
    what command is used to display the status of a printer queue?
    • Lpr -P "printer name" "file name"
    •    or 
    • print /d:<printername> "file"
  48. What command in windows XP formats a disk?
    format "volume" /fs:"filesystem" /q /v:"label"

    filesystem = FAT/FAT32/NTFS

    /q = quick format

    label = label for volume

    use "fsutil fsinfo drives" to list all drives on a system
  49. what windows command can be used to mark a partition as inactive?
    diskpart > inactive

    Partition must be selected before using this command
  50. what command can be used to edit windows boot settings stored in boot.ini (windows XP & earlier only)?
    Bootcfg

    • /delete - delete an os entry 
    • /rebuild - rebuild boot.ini
    • /default - specify default os
  51. what windows command can be used to display or change file attributes?
    Attrib

    • + = turn on
    • - = turn off

    • R = read only
    • H = hidden
    • A = active
    • S = system
  52. what windows XP command lists all drives in a system, display the drive type, & display the filesystem?
    Fsutil fsinfo [drives] [drivetype] [volumeinfo]

    • drives - list all drives in the system
    • drivetype - displays drives's type
    • volumeinfo - displays filesystem for a volume
  53. what windows command is used to search for a string of text in a file?
    find [/i] [/n] "string" [file]

    • /i - specifies search is not case sensitive
    • /n - precedes each line with file's line #
  54. What windows command is used to uncompress compressed files?
    Expand [source] [Destination]
  55. What windows command mirrors a simple volume?  
    what command removes a mirrored volume?
    • diskpart > select [volume]
    • diskpart > add disk = [disk]
    • diskpart > break disk = [disk]

    must select volume or partition to mirror using select first
  56. what windows command can be used to greand a user permission to read & execute all files & folders in the "modding" directory?
    Icacls "modding" /grant "user":rx /T

    • /T - include subfolders / files
    • /C - continue on file errors
    • /grant "user":permission - grants user permission 

    permission can be : F- full access, M - modify, RX - read / execute, R - read-only, W - write only

    user can be group or SID also
  57. what 2 windows commands can be used to remove a file?
    del & erase "file / folder"

    • /p - prompt for confirmation
    • /s - deletes specified files from director & subdirectory
    • /q - quiet mode, no prompt for deletion.
  58. what windows command is used to add objects to an active directory domain server?
    dsadd
  59. what windows command moves a single object within a domain from its current location to a new one?
    dsmove
  60. what windows command can be used to mark a partition as active?
    diskpart > active [partition#]

    note: you must select a disk & partition by using select [disk] & select [partition] or by using select [volume]
  61. what windows command removes a drive letter or mount point from a volume?
    diskpart > remove [letter = "letter of volume"] [dismount]

    letter = letter of volume to be removed

    dismount - takes volume offline, making it unmountable
  62. what command can be used to stop windows from automatically mounting a volume?
    diskpart > automount [enable / disable ]

    specifying just automount makes windows display if automount is enabled
  63. what windows command displays messages?
    • Echo [message] [on| off]
    • on|off = turns echoing on or off, on by default
  64. what windows command displays the durrent user logged on?
    whoami

    /priv - displays security priviledges
  65. what windows command can be used to copy files & folders including subdirectories?
    xcopy

    • /s - copies subdirectories
    • /e - copy folder even if empty
    • /t - copy folder tree, but not files
  66. what windows command is used to kill processes?

    what command is used to list processes?
    • 1.) taskkill /pid "processid" or /im "image name"
    • 2.) tasklist

    /v - display more detailed information

    /svc - display service info for each process
  67. What command can be used to view available shares on a network?
    net view
Author
gamebooy2020
ID
166618
Card Set
windows commands
Description
windows commands
Updated