The best you're going to do is remove the device driver, which will disable ALL the devices that driver supports. For instance, to remove the serial port driver, you'll use WMI to get the instance of a Win32_SystemDriver class who's Name propery is "Serial". A quick and dirty script would look something like this:
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer(strServer, strNameSpace, strUserName, strPassword)
objService.Security_.impersonationlevel = 3
Set objInstance = objService.Get("Win32_SystemDriver='Serial'")
objInstance.Delete
Dave Kreskowiak Microsoft MVP - Visual Basic