Windows Workstation (PC) Commands

ipconfig

     To get all local network information for your computer use the /all switch as shown below, followed by the results that would be seen when using this command.


ipconfig /all

     Display full configuration information. 


ipconfig /displaydns

     Running the above command would display all the DNS information.


ipconfig /flushdns

     Delete all DNS entries or Purges the DNS Resolver cache.


ipconfig | find "192.168.1"

      To search for the matching  


ipconfig /release

     Release the IP address for the specified adapter.


ipconfig /renew

     Renew the IP address for the specified adapter.


ipconfig /registerdns

     Refreshes all DHCP leases and re-registers DNS names


ipconfig /showclassid

     Displays all the dhcp class IDs allowed for adapter.


ipconfig /setclassid

     Modifies the dhcp class id.


ipconfig | find"1.1.1.1'

    To find ip address status


ping

    Ping is a computer network administration software utility used to test the reachability of a host on an Internet Protocol network.
    Helps in determining TCP/IP networks IP address as well as determine issues with the network and assists in resolving them


ping -t

      Use the -t option to ping continuously any address until you cancel it by pressing Ctrl+C.
         Example:- ping 192.168.1.1 -t


ping 8.8.8.8 -l 1400

      Default ping size is 32 bytes. There will be certain situation to use ping with different size, to identify or capture the specific traffic packets using firewalls or wireshark.
           Example:- ping 8.8.8.8 -l 1024


ping -n 10 -l 1500 8.8.8.8

      In this example, the ping command is used to ping 8.8.8.8. The -n option tells the ping command to send 10 ICMP Echo Requests instead of the default of 4, and the -l option sets the packet size for each request to 1500 bytes instead of the default of 32 bytes. The result displayed in the Command Prompt window will look something like this:


arp -a   

    to show mac table


pathping 

    for details trace report


tracert

    Tracert command is used to visually see a network packet being sent and received and the amount of hops required for that packet to get to its destination.
Example:-
      - tracert itwindow123.blogspot.com
      - tracert 8.8.8.8


nslookup

    Nslookup is a network administration command-line tool available in many computer operating systems for querying the Domain Name System (DNS) to obtain domain name or IP address mapping, or other DNS records. The Nslookup command-line tool is available only if you have installed the TCP/IP protocol.


netstat 


    Netstat is a command-line network utility tool that displays network connections for the Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics.

To display both the Ethernet statistics and the statistics for all protocols.
To display the statistics for only the TCP and UDP protocols.
To display the statistics for only the TCP protocols.
To display active TCP connections and the process IDs every 5 seconds.
To display active TCP connections and the process IDs using numerical form.
To show all active TCP connections.
To shows active TCP connections, with corresponding process identifier [-o] for each connection, so we can determine which program on my computer initiated each one.
To see protocol specific statistics [-s] but not all of them, just TCP stats [-p tcp]. I also want the foreign addresses displayed in FQDN format [-f].


Examples:-

netstat -e -s

netstat -s -p udp

netstat -s -p tcp

netstat -o 5

netstat -n -o

netstat -f

netstat -o

netstat -s -p tcp -f


netsh

    Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh can also save a configuration script

Examples:-
Show the list of wireless profiles:
C:>netsh wlan show profiles

Retrieve the stored key (WPA, WEP, etc) of a profile:
netsh wlan show profiles name=[profile name] key=clear

Delete a wireless profile:
netsh wlan delete profile name=[profile name]

Set a network’s priority:
netsh wlan set profileorder name=[profile name]interface=[interface_name] priority=1

Stop automatically connecting to a network:
netsh wlan set profileparameter name=[profile name] connectionmode=manual


telnet 

    Telnet is software that allows users to remotely access another computer such as a server, network device, or other computer. With telnet users can connect to a device or computer, manage a network device, setup a device, transfer files, etc.

Example:-
     -telnet 192.168.1.1

     You should enable the telnet is windows one time.

Windows 7, 8. 10:

     Open Windows Start menu > Type "Control Panel" > Press Enter > “Programs” > "Programs and Features" > Turn Windows features on or off > Select "Telnet Client" > Press “OK"
Using Telnet to Test Open Ports

One of the biggest perks of Telnet is with a simple command you can test whether a port is open. Issuing the Telnet command telnet [domainname or ip] [port] will allow you to test connectivity to a remote host on the given port.

Issue the following command in the Command Prompt:

telnet [domain name or ip] [port]

Put the IP address or domain name of the server you’re trying to connect to in place of [domain name or ip], and replace the second brackets with the port number on the remote machine, connection to which you want to test.

For example, to verify connection to 192.168.0.10 on port 25, issue the command: telnet 192.168.0.10 25

Example:- telnet 192.168.0.10 25
-If the connection succeeds, a blank screen will show up, meaning that the computer port 25 is open.

-A failed connection will be accompanied by an error message. It can indicate either a closed port or the fact that the indicated remote server is not listening on the provided port.


getmac 

    Returns the media access control (MAC) address and list of network protocols associated with each address for all network cards in each computer, either locally or across a network.

It will be hexadecimal format. For example, consider a network adapter with the MAC address "00-14-22-01-23-45."

Nowdays, we can use mac-address either completely bypass the traffic or block the traffic.

Example:-
C:/ getmac
 


route 

    The function and syntax of the Windows ROUTE command is similar to the UNIX or Linux route command. Use the command to manually configure the routes in the routing table.

- Open 'cmd' as administrator
  

Example:-
      C:> route add 192.168.20.0 mask 255.255.255.0 192.168.20.1 /p

or

    route add -p 192.168.0.0 mask 255.255.255.0 192.168.0.1

    To show routing table
    >route print

     To delete one route entry from routing table
    >route delete 192.168.20.0


nbtstat


delete Microsoft Edge from windows 10


C:\Windows\system32>cd C:\Program Files (x86)\Microsoft\Edge\Application\90.0.818.62\Installer
--uninstall --system-level --verbose-logging --force-uninstall 




*****

0 Comments