A VBS Script using WMI would be able to do it. Might be easier to maintain in the long run rather than a batch file or a third-party program.