Some Important and Useful Cmd Prompt Commands

download Some Important and Useful Cmd Prompt Commands

of 4

Transcript of Some Important and Useful Cmd Prompt Commands

  • 8/9/2019 Some Important and Useful Cmd Prompt Commands

    1/4

    some important and useful cmd prompt commands(by Rajesh)ADDUSERS --Add or list users to/from a CSV fileARP -- Address Resolution ProtocolASSOC -- Change file extension associationsASSOCIAT --One step file associationAT -- Schedule a command to run at a later timeATTRIB --Change file attributes

    BOOTCFG --Edit Windows boot settingsBROWSTAT --Get domain, browser and PDC info

    CACLS -- Change file permissionsCALL --Call one batch program from anotherCD --Change Directory - move to a specific FolderCHANGE-- Change Terminal Server Session propertiesCHKDSK -- Check Disk - check and repair disk problemsCHKNTFS -- Check the NTFS file systemCHOICE --Accept keyboard input to a batch fileCIPHER --Encrypt or Decrypt files/foldersCleanMgr ---Automated cleanup of Temp files, recycle bin

    CLEARMEM ---Clear memory leaksCLIP ---Copy STDIN to the Windows clipboard.CLS ---Clear the screenCLUSTER ---Windows ClusteringCMD ---Start a new CMD shellCOLOR --- Change colors of the CMD windowCOMP ---Compare the contents of two files or sets of filesCOMPACT --- Compress files or folders on an NTFS partitionCOMPRESS ---Compress individual files on an NTFS partitionCON2PRT ---Connect or disconnect a PrinterCONVERT ---Convert a FAT drive to NTFS.COPY ---Copy one or more files to another locationCSCcmd ---Client-side caching (Offline Files)

    CSVDE ---Import or Export Active Directory data

    DATE --- Display or set the dateDcomcnfg DCOM ---Configuration UtilityDEFRAG ---Defragment hard driveDEL ---Delete one or more filesDELPROF--- Delete NT user profilesDELTREE ---Delete a folder and all subfoldersDevCon ---Device Manager Command Line UtilityDIR ---Display a list of files and foldersDIRUSE --- Display disk usageDISKCOMP--- Compare the contents of two floppy disksDISKCOPY ---Copy the contents of one floppy disk to another

    DNSSTAT ---DNS StatisticsDOSKEY --- Edit command line, recall commands, and create macrosDSADD ---Add user (computer, group..) to active directoryDSQUERY--- List items in active directoryDSMOD ---Modify user (computer, group..) in active directory

    ECHO--- Display message on screenENDLOCAL--- End localisation of environment changes in a batch fileERASE ---Delete one or more filesEXIT ---Quit the current script/routine and set an errorlevel.

  • 8/9/2019 Some Important and Useful Cmd Prompt Commands

    2/4

    EXPAND --- Uncompress filesEXTRACT--- Uncompress CAB files

    FC--- Compare two filesFDISK--- Disk Format and partitionFIND ---Search for a text string in a fileFINDSTR--- Search for strings in filesFOR /F ---Loop command: against a set of filesFOR /F ---Loop command: against the results of another commandFOR ---Loop command: all options Files, Directory, ListFORFILES ---Batch process multiple filesFORMAT ---Format a diskFREEDISK ---Check free disk space (in bytes)FSUTIL --- File and Volume utilitiesFTP --- File Transfer ProtocolFTYPE--- Display or modify file types used in file extension associations

    GLOBAL --- Display membership of global groupsGOTO ---Direct a batch program to jump to a labelled line

    HELP--- Online HelpHFNETCHK--- Network Security Hotfix Checker

    IF--- Conditionally perform a commandIFMEMBER Is the current user in an NT WorkgroupIPCONFIG Configure IP

    KILL Remove a program from memory

    LABEL --- Edit a disk labelLOCAL --- Display membership of local groupsLOGEVENT--- Write text to the NT event viewer.LOGOFF --- Log a user off

    LOGTIME --- Log the date and time in a file

    MAPISEND ---Send email from the command lineMEM --- Display memory usageMD --- Create new foldersMKLINK --- Create a symbolic link (linkd)MODE ---Configure a system deviceMORE --- Display output, one screen at a timeMOUNTVOL ----Manage a volume mount pointMOVE --- Move files from one folder to anotherMOVEUSER--- Move a user from one domain to anotherMSG ---Send a messageMSIEXEC --- Microsoft Windows Installer

    MSINFO ---Windows NT diagnosticsMSTSC --- Terminal Server Connection (Remote Desktop Protocol)MUNGE --- Find and Replace text within file(s)MV --- Copy in-use files

    NET --- Manage network resourcesNETDOM --- Domain ManagerNETSH ---Configure network protocolsNETSVC ---Command-line Service ControllerNBTSTAT --- Display networking statistics (NetBIOS over TCP/IP)

  • 8/9/2019 Some Important and Useful Cmd Prompt Commands

    3/4

    NETSTAT --- Display networking statistics (TCP/IP)NOW --- Display the current Date and TimeNSLOOKUP--- Name server lookupNTBACKUP ---Backup folders to tapeNTRIGHTS E---dit user account rights

    PATH --- Display or set a search path for executable filesPATHPING ---Trace route plus network latency and packet lossPAUSE --- Suspend processing of a batch file and display a messagePERMS --- Show permissions for a userPERFMON ---Performance MonitorPING ---Test a network connectionPOPD --- Restore the previous value of the current directory saved by PUSHDPORTQRY--- Display the status of ports and servicesPRINT --- Print a text filePRNCNFG --- Display, configure or rename a printerPRNMNGR --- Add, delete, list printers set the default printerPROMPT --- Change the command promptPsExec --- Execute process remotelyPsFile --- Show files opened remotely

    PsGetSid --- Display the SID of a computer or a userPsInfo ---List information about a systemPsKill --- Kill processes by name or process IDPsList --- List detailed information about processesPsLoggedOn ---Who's logged on (locally or via resource sharing)PsLogList ---Event log recordsPsPasswd --- Change account passwordPsService --- View and control servicesPsShutdown ---Shutdown or reboot a computerPsSuspend ---Suspend processesPUSHD --- Save and then change the current directory

    QGREP --- Search file(s) for lines that match a given pattern.

    RASDIAL ---Manage RAS connectionsRASPHONE ---Manage RAS connectionsRECOVER --- Recover a damaged file from a defective disk.REG --- Registry: Read, Set, Export, Delete keys and valuesREGEDIT --- Import or export registry settingsREGSVR32--- Register or unregister a DLLREGINI ---Change Registry PermissionsREM --- Record comments (remarks) in a batch fileREN --- Rename a file or files.REPLACE --- Replace or update one file with anotherRD ---Delete folder(s) [remove dir]RDISK ---Create a Recovery Disk

    RMTSHARE ---Share a folder or a printerROBOCOPY--- Robust File and Folder CopyROUTE --- Manipulate network routing tablesRUNAS --- Execute a program under a different user accountRUNDLL32--- Run a DLL command (add/remove print connections)

    SC --- Service ControlSCHTASKS--- Create or Edit Scheduled TasksSCLIST --- Display NT ServicesScriptIt Control ---GUI applications

  • 8/9/2019 Some Important and Useful Cmd Prompt Commands

    4/4

    SET --- Display, set, or remove environment variablesSETLOCAL--- Control the visibility of environment variablesSETX ---Set environment variables permanentlySHARE --- List or edit a file share or print shareSHIFT --- Shift the position of replaceable parameters in a batch fileSHORTCUT ---Create a windows shortcut (.LNK file)SHOWGRPS ---List the NT Workgroups a user has joinedSHOWMBRS ---List the Users who are members of a WorkgroupSHUTDOWN ---Shutdown the computerSLEEP --- Wait for x secondsSOON --- Schedule a command to run in the near futureSORT --- Sort inputSTART --- Start a separate window to run a specified program or commandSU ---Switch UserSUBINACL ---Edit file and folder Permissions, Ownership and DomainSUBST --- Associate a path with a drive letterSYSTEMINFO--- List system configurationTASKLIST--- List running applications and servicesTIME ---Display or set the system timeTIMEOUT--- Delay processing of a batch file

    TITLE --- Set the window title for a CMD.EXE sessionTOUCH --- Change file timestampsTRACERT --- Trace route to a remote hostTREE --- Graphical display of folder structureTYPE --- Display the contents of a text fileUSRSTAT--- List domain usernames and last loginVER ---Display version informationVERIFY --- Verify that files have been savedVOL --- Display a disk labelWHERE --- Locate and display files in a directory treeWHOAMI --- Output the current UserName and domainWINDIFF --- Compare the contents of two files or sets of filesWINMSD --- Windows system diagnostics

    WINMSDP--- Windows system diagnostics IIWMIC ---WMI CommandsXCACLS --- Change file permissionsXCOPY--- Copy files and folders