CMD

From Piszczynski
Revision as of 19:02, 6 June 2020 by piszczynski>Aleks (→‎Handy CMD commands)

Handy CMD commands

Check network settings

  • ipconfig


Check DNS and resolve ip to host

  • nslookup

View uptime and network adapter stats

  • net stats server (for server)
  • net stats workstation (for regular PC)

View network resources

  • net view

List Tasks:

  • tasklist

Reset TCP/IP - when the network is not working and there is no apparent reason, will need a restart of windows

  • netsh int ip reset

Reset windows sockets - when windows networking is not working correctly

  • netsh winsock reset

Stop process

  • taskkill /im "name of program"
  • taskkill /f /in "name" - to force close
  • taskkill /pid "id number off process"
  • taskkill /s "other computer name" /im "name of program"
  • taskkill /f /fi "status eq not responding" - kill all not responding processes using filter "/fi" and force "/f"

Log people off servers

  • qwinsta /server:Servername
  • logoff /server:Servername id


Open control panel items

  • control /name microsoft.<controlpanelitem>
  • eg "control /name microsoft.credentialmanager"


Change prompt text

  • prompt


Perform IP scan:

  • for /l %i in (1,1,254) do @ping 10.170.1.%i -n 1 -w 100 | find "Reply"

Change CMD launch settings

Change Autorun reg key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor