CMD: Difference between revisions

From Piszczynski
piszczynski>Aleks
(Created page with " == Handy CMD commands == Log people off servers *qwinsta /server:Servername *logoff /server:Servername id")
 
m (10 revisions imported)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:


== 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
Log people off servers
Line 6: Line 36:
*qwinsta /server:Servername
*qwinsta /server:Servername
*logoff /server:Servername id
*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

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