I dont know of any modules that will do this. Microsoft provide DevCon, a command line tool which may be able to help you with this. Check out the documentation, you may be able to use this in conjunction with your Perl script to achieve what you need.