Sunday, November 24, 2024

Get Windows Product Key from a preload using the command line

 

1. Using Command Prompt:

  1. Open Command Prompt as an Administrator:
    • Press Windows + S, type cmd, right-click on Command Prompt, and select Run as Administrator.
  2. Type the following command and press Enter:
    wmic path softwarelicensingservice get OA3xOriginalProductKey

    3. The product key will be displayed if it is embedded in your BIOS/UEFI.

    2. Using PowerShell:

    1. Open PowerShell as Administrator:
      • Press Windows + S, type PowerShell, right-click, and select Run as Administrator.
    2. Enter the following command:

     (Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

    The product key should appear if it exists in the firmware.

     

     


Friday, May 26, 2023

Change monitor input from the command line

 

 

Download and run ControlMyMonitor from https://www.nirsoft.net


 


 

 Identify the monitor to control in the gui, and then run the command parameters from the command line.  Input Select parameter allows you to choose the input from the command line from the list of available input values.

Parameter 60 controls the input selection (ie VGA, HDMI1, HDMI2, DisplayPort, DVI).  Use  Trial and error to determine which # is associated with the input. 

For example:

 

To set the monitor to the Input HDMI #1

.\ControlMyMonitor /setvalue \\.\DISPLAY2\Monitor0 60 17  

 

 

To set the monitor to the Input DisplayPort #1

.\ControlMyMonitor /setvalue \\.\DISPLAY2\Monitor0 60 15