• Re: Powershell to do "devcon /rescan"

    From John C.@21:1/5 to Mr. Man-wai Chang on Fri Feb 7 04:22:16 2025
    On 25/02/07 03:31 AM, Mr. Man-wai Chang wrote:
    How could I make Windows 10 to re-scan (re-detect) all USB devices using Powershell? Or ... maybe pnputils?

    I used devcon.exe back then, but it seemed it's no longer quite
    supported now. :)

    Some USB devices (possibly badly-written drivers) might sometimes be
    dropped by Windows 10, and hence my need for devcom.exe!

    You could instead use Nirsoft's USBDView:

    https://www.nirsoft.net/utils/usb_devices_view.html

    --
    John C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Slootweg@21:1/5 to Mr. Man-wai Chang on Fri Feb 7 15:36:40 2025
    Mr. Man-wai Chang <toylet.toylet@gmail.com> wrote:
    On 7/2/2025 8:22 pm, John C. wrote:

    You could instead use Nirsoft's USBDView:

    https://www.nirsoft.net/utils/usb_devices_view.html

    Not sure if this tool could do it auto-magically.... I did come across
    this tool when doing Google Search!

    It depends on what you mean by "dropped" (in your OP). If you mean
    disabled, then there is a "enable_all" command-line option.

    Anyway, just try it. Nirsoft utilities are very powerful/versatile and
    there are many different ones. Very likely that one or more of them
    satisfy your needs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Slootweg@21:1/5 to All on Fri Feb 7 15:56:34 2025
    A bit earlier, I wrote:
    Mr. Man-wai Chang <toylet.toylet@gmail.com> wrote:
    On 7/2/2025 8:22 pm, John C. wrote:

    You could instead use Nirsoft's USBDView:

    https://www.nirsoft.net/utils/usb_devices_view.html

    Not sure if this tool could do it auto-magically.... I did come across
    this tool when doing Google Search!

    It depends on what you mean by "dropped" (in your OP). If you mean disabled, then there is a "enable_all" command-line option.

    Anyway, just try it. Nirsoft utilities are very powerful/versatile and there are many different ones. Very likely that one or more of them
    satisfy your needs.

    I partly confused things with Uwe Sieber's utilities, especially the
    USB ones.

    So I looked again at Uwe's site and this seems to be what you're
    looking for:

    <quote>

    RescanDevices

    When an IDE or SATA drive has been prepared for safe removal it can be reactivated by a scan for new hardware.
    That's what this tool initiates.

    It is a non interactive, invisible Windows application. It does the same
    as Microsoft's tool DEVCON when called with parameter 'rescan', but no
    console window pops up.

    Download: rescandevices.zip

    </quote>

    RescanDevices is listed way down this page:

    <https://www.uwe-sieber.de/drivetools_e.html>

    The description talks about "drive"s, but as it says that it initiates
    a scan for new hardware and does the same as 'devcon /rescan' it seems
    to fit your need.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)