Posts

Showing posts with the label Commands

Set A Static IP Address On Windows 7 From The Command Line

Windows has traditionally been all about the GUI. However, in Windows 7 it’s possible to set a static IP address from the command line. Here’s how to do it. Let’s say you want to give your Windows 7 system an IP address of 192.168.1.2, a subnet mask of 255.255.255.0, a default gateway of 192.168.1.254, and a DNS server address of 192.168.1.200. Go to an elevated command prompt (right-click on the command prompt icon and select Run As Administrator) and type these two commands: netsh interface ipv4 set address “local area connection” static 192.168.1.2 255.255.255.0 192.168.1.254 netsh interface ipv set dnsservers “local area connection” static 192.168.1.200 These commands will configure the Local Area Connection with a static IP, netmask, gateway, and DNS server. If you want to switch back to receiving your networking settings from a DHCP server, use these commands: netsh interface ipv4 set address name=”local area connection” source=dhcp netsh interface i...

Command line to find out if the OS is running a 32-bit version or 64-bit of Windows?

We can get this via WMI: "wmic OS get OSArchitecture"   Example on my system: C:\>wmic OS get OSArchitecture OSArchitecture 32-bit

How to find what "ip addresses" are being used in a subnet

Quickly Find Used IP Addresses Instead of manually pinging all IP addresses on your LAN you can use this nice command: Open Command Prompt and type: FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">> c:\ipaddresses.txt For E.g  FOR /L %i IN (1,1,254) DO ping -n 1 10.30.220.%i | FIND /i "Reply">> c:\ipaddresses.txt The "-n 1" is for only 1 ping packet to be sent to each computer. Change 192.168.0 to match you own Network ID. This will ping all IP addresses on the 192.168.0.0 network segment and create a text file called IPADDRESSES.TXT in C:\, where it will list only the IP addresses that gave a reply. You can also add a -a to the PING command to resolve all the responding IP addresses to HOST names, but doing so will cause the script to take a considerable time to finish: FOR /L %i IN (1,1,254) DO ping -a -n 1 192.168.0.%i | FIND /i "Reply">> c:

How to find the computer name of one PC connected in LAN through IP Adress

Method 1. Check the DHCP Adresses list in the DHCP sever Method 2. Broadcast net view command and then do the nbtstat -a -n (e.g nbtstat -a 172.16.90.68)