Solved

change static IP address, DNS and so on automatically

Posted on 2012-03-23
7
751 Views
Last Modified: 2012-03-26
Hi Experts,

We have a couple of thousands of servers which we want to change their IP addresses and other info.  Please help if you know some tools or script can do the job automatically.  I will appreciate your sharing the experience.  

We have ESX servers which run Windows and other OS on top of them as virtue machine.  Also we have some true Windows servers and Ubuntu servers.

Regards,

Enjoynet
0
Comment
Question by:EnjoyNet
7 Comments
 
LVL 118

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 50 total points
ID: 37759666
check this script for physical machines or virtuals

http://gallery.technet.microsoft.com/scriptcenter/Change-IP-configuration-4b136f36

this will change the IP Address on virtual machines

Get-VM VMName | Get-VMGuestNetworkInterface -GuestUser Administrator -GuestPassword <password> -HostUser root -HostPassword <password> | Set-VMGuestNetworkInterface -IPPolicy Static -Ip <IPAddress> -Netmask 255.255.252.0 -Gateway <Gateway> -GuestUser Administrator -GuestPassword <password> -HostUser root -HostPassword <password> 

Open in new window

0
 
LVL 77

Expert Comment

by:arnold
ID: 37759681
You can use netsh to add an ip to the you would likely need to use a vbscript that will pull the ip that will be assigned from somewhere or is this just a segment change?
0
 
LVL 11

Accepted Solution

by:
Khandakar Ashfaqur Rahman earned 100 total points
ID: 37759855
There are some scripts that you can use but at least you have to define the IP address you want to set into a pc.Because for each pc IP address should be unique to avoid IP conflict.However, you may check the following URL:
http://community.spiceworks.com/how_to/show/320

Otherwise, DHCP would be the best.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 30

Assisted Solution

by:IanTh
IanTh earned 75 total points
ID: 37760473
use dhcp get the ip address by a script and then use that for the static ip address
0
 
LVL 77

Assisted Solution

by:arnold
arnold earned 75 total points
ID: 37760603
Using dhcp, there is no need for a script, the Mac address can be used in the reservation and dynamically allocate the static ip, the risk is that should there be issues with dhcp the other servers will have issues.
0
 
LVL 30

Expert Comment

by:IanTh
ID: 37760665
if you have multiple dhcp servers yes
0
 

Author Comment

by:EnjoyNet
ID: 37768997
Hi All,

Thank you for your responses.  Some of you mentioned to use DHCP with Mac reservation. I think that is the best for our case.  

Regards,

enjoyroot
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Upgrade vcenter server 5.5.0 build 2001466 8 69
VMware Workstation 12 Player 16 35
Linux VM 6 36
Vsphere 6.0 or 6.5? 15 14
Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now