Scripting: Changing Networking Setup on Remote Windows Servers

I recently did a rather big reorganization of my domain controllers, in relation to an domain wide upgrade to 2008 server, and as a I result of this I had to re-configure the DNS settings for all my member servers. Being somewhat lazy and not particularly fond of repetitive tasks, I figured there had be a way to automatically change the required settings.


I ended up using a couple of great tools and some vbscript "magic" and was able to change the DNS settings on all my member servers within a couple of minutes.It would have been much more time consuming having to do this server by server manually, and this process also guarantees that the settings are the same on all my servers.

Enough with the rationale already, let's get into the solution itself. It's pretty easy, but does require a couple of easily available tools, a bat file and a VBscript.

Tools:

  • psexec
  • psexec @servernames.txt -c -p administrator -u [password] SetDNS.bat
  • DumpServernames.vbs
    This dumps all the server names in a given OU into a text file
    Usage: cscript DumpServernames.vbs > servernames.txt
    Set colItems = GetObject _ ("LDAP://ou=Servers, ou=something, dc=something, dc=local") For Each objItem in colItems Wscript.Echo objItem.CN Next
  • SetDNS.bat
    netsh interface ip delete dns "Local Area Connection" all netsh interface ip add dns "Local Area Connection" [IP DNS SERVER] netsh interface ip add dns "Local Area Connection" [IP DNS SERVER] index=2 ipconfig /all

Caveat alerts:

  • The netsh command outlined requires that the network connection you want to change settings on is called "Local Area Network".

    If you have manually renamed your network connections inside Windows 2003/2008, this will fail, so update the script accordingly


  • You will need to update the vbscript with your local OU setup as well as edit SetDNS.bat and insert your own DNS server IP values


September 11, 2009 at 12:17pm | 0 Comments
Tagged: , , , , , and

PatchSee Demo Kit - Neat idea with a cheap demo

A while ago I got an email from a local vendor here in Bergen, Norway, pimping the PatchSee Optical Technology cables. Intrigued by the idea of being able to identify both ends of the cables in our server room I ordered a free demo kit.

A few days ago the demo kit arrived, but while it's impossible to see on the poor mobile photo of the demo kit above, I was very surprised when I examined it closely:

  1. The demo light only works for about 10 minutes.
    Thats probably fair enough, but as I only have one cable I don't really see why they should limit it at all?
  2. The cable itself. I mean, would it kill them to actually provide a fully functional Cat6 cable?
    The demo cable isn't even wired properly end to end, so it's basically useless.

I can understand the need to limit the demo kits, but I can't really understand a vendor that intentionally sends you a demo of their product where the demo itself is so limited that it's basically useless.

Would you buy something from someone who "demonstrates" their products this way?

September 9, 2009 at 10:00pm | 2 Comments
Tagged: , , , and

Installing Windows from a USB Stick

One of the most popular posts on this site is the "Installing Debian from a USB Stick" post from October 2008. Seems like it's about time I posted something similar but for Windows installations.

Enter Novicorp WinToFlash. This little piece of software, still in beta, makes the task of transferring your existing Windows install CD or .ISO to a bootable USB device a breeze.

You can transfer Windows XP/Vista/7, Windows Server 2003/2008 and even Win PE installation files directly to a USB device, both spen drives and HDDs, and then use that device to install your computers.

Easy step by step instructions are available, but frankly the software doesn't need much intervention. All I did was to mount a random (in this case Windows 7 RC1) .iso file from my HDD as a virtual drive, plug in my Corsair Flash Voyager 16 GB pen drive and start the WinToFlash software.

I ran through the wizard, specifying the location of the Windows files and the USB drive and off it went:

Screenshot Gallery.

The installation of Windows 7 from the generated USB pen drive went flawlessly and very quickly. It sure is nice to lug around a USB pen drive rather than DVDs, provided your computer lets you allow from a USB boot device that is...

September 9, 2009 at 2:59pm | 1 Comment
Tagged: , , and

Administering VMware™ Site Recovery Manager™ 1.0

VMware Logo

Mike Laverick has just announced that he has made his Administering VMware™ Site Recovery Manager™ 1.0 book available for free download!

You can either download the high quality PDF in English or Spanish or you can order the print edition for printing cost + shipping to your location. Download or order yours now!

September 8, 2009 at 12:14am | 0 Comments
Tagged: , , , , , and

Want VMware Fusion or Workstation?

VMware Logo

On Tuesday 8th until Thursday the 10th of September you can use the discount code DESKTOPSALE and get 40% off Fusion and Workstation at the VMware Store.

(shh! Don't tell anyone but rumor has it that the code will work on Monday 7th as well)

September 4, 2009 at 4:35pm | 0 Comments
Tagged: , , and

← Previous  1 2 3 4 5 … 110 Next →