Archive for August, 2014

Today I’ve released what I’m considering a 1.0 release of the Uninstall-Java Powershell script and Module code.

I’ve performed some testing of both the script and module on Windows 7, 8 and 8.1 and the code seems to be stable and clean. As always I highly recommend testing in your environment.

This project started after the furor over major security bugs in Java and now has developed into a full project aimed at simplifying the management of Java versions in large environments by ensuring wither java is not installed or only the approved version is deployed. Previous articles (here and here) I wrote go into some of the detail and the development progress is tracked in some of the comments.

In the process I started my first Codeplex project as a way to distribute the code. There was a bit of a learning curve in using Codeplex and Git and along with some character encoding issues led to code being available which didn’t run when downloaded from Codeplex. These have been fixed (sorry to anyone who tried to use the damaged code) and is now available from the Codeplex project download page at https://poshuninstalljava.codeplex.com.

I’d appreciate any feedback or results of any testing that any of you do, either on the Codeplex project site or as a comment against this post. Documentation should be sufficient for anyone with basic Powershell knowledge and as time allows I’ll try and improve both the documentation in Codeplex and within the code itself.

Advertisement

I’ve hit upon the following bug in what should have been a simple DNS search server change. Initially we thought this was due to us using a method in the Win32_networkconnection WMI class to change the DNS search servers list but apparently this will occur if you completely change the DNS servers in the list via the gui.

If you change the dns search server list completely then reboot the server then the server will trigger the original DNS servers to remove the A record for that server and then on restart attempt to register itself with the new DNS servers configured. This leads to an issue if both the orginal and new DNS servers are part of the same replicated AD DNS zone. The time between the two events means that the new DNS servers may still have the orginal A record listed and will reject the servers attempt to re register. Then the deletion replicates and the record is removed leaving you with a server with no A record in the zone.

The current workaround is to use the ipconfig /registerdns command twice, with a time gap between the two issued commands to ensure the deletion is replicated to the new DNS servers before registering again. Having a reasonably long TTl on the record will improve your odds of DNS client cache retaining the IP of that server while you apply the commands.

http://support.microsoft.com/kb/2520155