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

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....

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 ...

Ephone Hunt Groups and Voice Hunt Groups Comparison

SIP phones support Voice Hunt Groups. SCCP phones support Ephone Hunt Groups, and in Cisco Unified CME 4.3 and later versions, SCCP phones also support Voice Hunt Groups.  Table 69  compares the features of Ephone Hunt Groups and Voice Hunt Groups. Table 69 Feature Comparison of Ephone Hunt Groups and Voice Hunt Groups Feature Ephone Hunt Voice Hunt Group Endpoints Supported SCCP only SIP, SCCP, PSTN, and FXS Parallel Hunt Groups (Call Blast) No (for alternative, see the  "Shared-Line Overlays" section ) Yes Hunt Statistics Support Yes No B-ACD Support Yes No Features such as present-call and login/logout Yes No Thanks & Regards Avinash Pillai URL :  http://avinashpillai.blogspot.com Email: avinashp25[AT]gmail[DOT]com