How programmatically disable the video card inserted into the PCI slot

Lev Gorinshteyn 21 Reputation points
2022-01-20T08:54:00.68+00:00

Is it possible to programmatically disable the video card inserted into the PCI slot for a comparative assessment of the quality of the video card built into the motherboard?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,645 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,426 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Castorix31 81,741 Reputation points
    2022-01-20T09:31:58.21+00:00

    Devices can be disabled with SetupDiSetClassInstallParams + SetupDiCallClassInstaller with DICS_DISABLE in x64

    1 person found this answer helpful.

  2. Docs 15,146 Reputation points
    2022-01-21T01:59:35.657+00:00

    Additional options that may enable you to compare the performance of each video:

    a) Turn off using the respective control panels
    Nvidia Optimus
    AMD Switchable graphics

    b) Open the BIOS > some computers have settings that can be turned on /off

    c) Modify / uninstall drivers

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .

    0 comments No comments

  3. Limitless Technology 39,366 Reputation points
    2022-01-21T10:03:13.907+00:00

    Hello LevGorinshteyn

    Yes, you can use the next:

    Script for Disabling :
    pnputil /disable-device "InstanceID"

    Script for Enabling:
    pnputil /enable-device "InstanceID"

    To find instance ID of your discrete card you can access Device Manager in Windows and from the properties of the Adapter, Details Tab, the value is on the "Device instance path"


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  4. S.Sengupta 15,191 Reputation points MVP
    2022-01-22T13:56:44.75+00:00

    Yes, there are PowerShell scripts available. You can kindly go through the following Microsoft reference:

    PnPUtil Examples

    0 comments No comments