CMD: Difference between revisions

From Piszczynski
piszczynski>Aleks
m (10 revisions imported)
 
(3 intermediate revisions by one other user not shown)
Line 9: Line 9:
*nslookup
*nslookup


View uptime and network adapter stats
*net stats server (for server)
*net stats workstation (for regular PC)


View network resources
View network resources
Line 16: Line 19:
*tasklist
*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
Stop process
Line 42: Line 50:
Perform IP scan:
Perform IP scan:
*for /l %i in (1,1,254) do @ping 10.170.1.%i -n 1 -w 100 | find "Reply"
*for /l %i in (1,1,254) do @ping 10.170.1.%i -n 1 -w 100 | find "Reply"
Check version of .net installed:
* reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s


== Change CMD launch settings ==
== Change CMD launch settings ==
Change Autorun reg key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
Change Autorun reg key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

Latest revision as of 22:30, 15 November 2023

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"

Check version of .net installed:

  • reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s

Change CMD launch settings

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