Enabling or Disabling Devices from the Command Line
It is possible to Enable or Disable devices from the command line using the Microsoft Devcon utility. This simulates device manager functionality.
The sample scripts attached will enable or disable all bluetooth devices from the following Intel wireless adapters:
- Intel® Centrino® Wireless-N 2230
- Intel® Centrino® Advanced-N 6235
- Intel® Centrino® Wireless-N 135
- Intel® Centrino® Wireless-N 1030
- Intel® Centrino® Advanced-N 6230
- Intel® Centrino® Wireless-N 130
Instructions
As the devcon utility is not redistributable you will need to download this from Microsoft:
- Download the Devcon package from here to your Desktop or Downloads folder.
- Extract the Devcon package by double clicking on the download. Extract the files to a sub-folder called "devcon extracted". Then copy the "devcon.exe" file from the i386 subfolder inside "devcon extracted".
- Paste the devcon.exe file into a new working folder called "BT utilities"
- Download the "enable or disable devices.zip" file attached to this article and extract the contents into "BT utilities"
- Modify the enable_BT.cmd and disable_BT.cmd files to include any additional device IDs that you might need.
- Make the "BT utilities" folder available over the network, and test it.
- You may be able to deploy this utility using group policy but bear in mind that any device manager operations, including those called by the Devcon utility, may require Administrative rights.
Note: If you deploy this utility using group policy please test it thoroughly to ensure that the script does not distrupt your user's experience.
Applies to:
- The utilities attached can be used for any device ID or IDs, however the specific devices controlled by the example script attached are the Intel bluetooth controllers included in their Mini-PCI wireless cards up to July 2013.