locked
Disable USB Devices on Windows Server 2008 RRS feed

  • Question

  • I have been looking everywhere to find a script that will disable and renable a usb device or devices on a computer.  We have printers that sometimes stop working and in order to fix the issue, we have to unplug and replug the printer back into the computer.  To save time from doing that, we had a devcon script for 2003 servers.  As i am aware, devcon has to be installed first before running.  I do not want to have to do this on a ton of computers we have.  I do not want to have to install devcon on newer servers unless its turned on by default.  Ive looked at WMI but seems to be less fortunate to find that it works. 

    Is there a script i can run on a server 2008 that will disable and re-enable a usb device in windows management? Or is devcon the only way to go about this?

    • Moved by Bill_Stewart Tuesday, April 7, 2015 3:08 PM Poor quality question/shows no research effort
    Tuesday, February 24, 2015 1:23 AM

All replies

  • DEVCON does not have to be installed and it can be run from a network share.  Just copy it to a convenient location anywhere in your network and run it.


    ¯\_(ツ)_/¯

    Tuesday, February 24, 2015 2:15 AM
  • I was aware that you have to install devcon before you can run any devcon script...
    Tuesday, February 24, 2015 2:22 AM
  • I was aware that you have to install devcon before you can run any devcon script...

    Who made up that story.  DEVCON is a utility program that can be used without installation.


    ¯\_(ツ)_/¯

    Tuesday, February 24, 2015 2:35 AM
  • ive read alot of posts that states you need to download the wdk or devcon installer to register the wmi commands. And due to the fact it says "is not a recognized as an internal or external command" when i run the devcon batch file in admin mode
    Tuesday, February 24, 2015 2:59 AM
  • ive read alot of posts that states you need to download the wdk or devcon installer to register the wmi commands

    I have been using DEVCON for years.  You are reading nonsense.  DEVCIN is a simple demo program that was originally distributed in the DDK.  It can be copied from any system where you have it and it will work.

    https://support.microsoft.com/kb/311272?wa=wsignin1.0

    Stop listening to jokers and read the Microsoft documentation.


    ¯\_(ツ)_/¯

    Tuesday, February 24, 2015 3:05 AM
  • and u have used this with server 2008? because it says...

    "You can use DevCon with Microsoft Windows 2000, Windows XP, and Windows Server 2003. You cannot use DevCon with Windows 95, Windows 98, or Windows Millennium Edition."

    Tuesday, February 24, 2015 3:17 AM
  • and u have used this with server 2008? because it says...

    "You can use DevCon with Microsoft Windows 2000, Windows XP, and Windows Server 2003. You cannot use DevCon with Windows 95, Windows 98, or Windows Millennium Edition."

    Device control is device control. 

    You are asking this in a scripting forum.  DEVCON is not a script.   It is a system utility.  If you have issues with it you need to ask in the proper forums for your issue.  There is no other method of low level device control.


    ¯\_(ツ)_/¯

    Tuesday, February 24, 2015 3:21 AM