Skip to main content

Bat File to Set /Change IP Address in Windows

1. How set IP Address by running .bat file
Copy the below script to a notepad, change the IP Addresses to your set of IP's and then run the bat file after saving the notepad as .bat file. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ECHO OFF
set varip=192.168.1.21
set varsm=255.255.255.0
set vargw=192.168.1.1
set vardns1=192.168.12.101
set vardns2=192.168.12.102
set varhome=www.google.com
REM ***** You don’t need to change anything below this line! ******
ECHO This fanciness is brought to you by AVINASH PILLAI !
ECHO Setting IP Address and Subnet Mask
netsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm%
ECHO Setting Gateway
netsh int ip set address name = "Local Area Connection" gateway = %vargw% gwmetric = 1
ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%
ECHO Setting Internet Explorer Homepage to %varhome%
reg add "hkcusoftwaremicrosoftinternet explorermain" /v "Start Page" /d "%varhome%" /f
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2. How set IP Address to DHCP by running .bat file
Copy the below script to a notepad and then run the bat file after saving the notepad as .bat file.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ECHO OFF
ECHO This fanciness is brought to you by AVINASH PILLAI!
ECHO Resetting IP Address and Subnet Mask For DHCP
netsh int ip set address name = "Local Area Connection" source = dhcp
ECHO Resetting DNS For DHCP
netsh int ip set dns name = "Local Area Connection" source = dhcp
ECHO Resetting Windows Internet Name Service (WINS) For DHCP
netsh int ip set wins name = "Local Area Connection" source = dhcp
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks & Regards
Avinash PillaiURL : http://avinashpillai.blogspot.com
Email: avinashp25[AT]gmail[DOT]com

Comments

Popular posts from this blog

What is Cybersecurity Risk? Definition & Factors to Consider

  Cybersecurity risk has become a leading priority for organizations as they embrace digital transformation and leverage advanced technology solutions to drive business growth and optimize efficiencies. Additionally, many organizations are increasingly reliant on third-party and   fourth-party vendors   or programs.  In this post, we’ll explore what cybersecurity risk is and take a look at some key cybersecurity risk factors that organizations across all industries should keep in mind as they build and refine their   cybersecurity risk management strategy .   What is cybersecurity risk? Cybersecurity risk refers to   potential threats and vulnerabilities   in digital systems. It encompasses the likelihood of a cyberattack compromising data or systems, leading to financial,   reputational , or operational damage. A few examples of cybersecurity risks include   ransomware ,   malware ,   insider threats ,   phishing attacks ...

How To Manage Dell Servers using OMSA – OpenManage Server Administrator On Linux

OMSA is a web based application to manage DELL PowerEdge Servers. Using OMSA you can perform proactive system monitoring, system diagnosis, troubleshoot hardware issues and configure RAID etc., You can also view and manage hardware’s embedded system management (ESM) log using OMSA. This is an jumpstart guide that explains how to install Dell OMSA on Linux. I have also provided few screenshots of DELL OMSA web application. 1. Download DELL OMSA Go to DELL support website -> click on “Drivers & Downloads” -> choose your server model (in my case, I selected PowerEdge 2850) -> choose the operating system -> scroll-down and expand ‘Systems Management’ -> Click on ‘OpenManage Server Administrator Managed Node’ -> Click on OM_5.5.0_ManNode_A00.tar.gz to download it. You can directly download it to your Linux server as shown below. # mkdir -p /usr/local/omsa # cd /usr/local/omsa # wget http://ftp.us.dell.com/sysman/OM_5.5.0_ManNode_A00.tar.gz 2....

Various Types of Hunt Groups

                                                         Various Types of Hunt Groups         * Sequential Hunt Groups    * Peer Hunt Groups   * Longest-Idle Hunt Groups   * Parallel Hunt Groups (Call Blast) Sequential Hunt Groups In a sequential hunt group, extensions always ring in the order in which they are listed, left to right, when the hunt group is defined. The first number in the list is always the first number to be tried when the pilot number is called. Maximum number of hops is not a configurable parameter for sequential hunt groups. Peer Hunt Groups In a peer hunt group, extensions ring in a round-robin order. The first extension to ring is the number in the list to the right of the last extension to ring when the pilot number was last called. Ringing pro...