Windows 10: Two product keys received from two different powershell scripts

Discus and support Two product keys received from two different powershell scripts in Windows 10 Updates and Activation to solve the problem; I just wanted clarification on the difference between these two product keys, and which one represents which. If I run this script powershell... Discussion in 'Windows 10 Updates and Activation' started by RahulKC2599, Jul 3, 2019.

  1. Two product keys received from two different powershell scripts


    I just wanted clarification on the difference between these two product keys, and which one represents which. If I run this script



    powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"


    I get a product key, but if I use this script


    function Get-WindowsKey {

    ## function to retrieve the Windows Product Key from any PC

    ## by Jakob Bindslet (*** Email address is removed for privacy ***)

    param ($targets = ".")

    $hklm = 2147483650

    $regPath = "Software\Microsoft\Windows NT\CurrentVersion"

    $regValue = "DigitalProductId"

    Foreach ($target in $targets) {

    $productKey = $null

    $win32os = $null

    $wmi = [WMIClass]"\\$target\root\default:stdRegProv"

    $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue)

    $binArray = ($data.uValue)[52..66]

    $charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"

    ## decrypt base24 encoded binary data

    For ($i = 24; $i -ge 0; $i--) {

    $k = 0

    For ($j = 14; $j -ge 0; $j--) {

    $k = $k * 256 -bxor $binArray[$j]

    $binArray[$j] = [math]::truncate($k / 24)

    $k = $k % 24

    }

    $productKey = $charsArray[$k] + $productKey

    If (($i % 5 -eq 0) -and ($i -ne 0)) {

    $productKey = "-" + $productKey

    }

    }

    $win32os = Get-WmiObject Win32_OperatingSystem -computer $target

    $obj = New-Object Object

    $obj | Add-Member Noteproperty Computer -value $env:computername

    $obj | Add-Member Noteproperty Caption -value $win32os.Caption

    $obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion

    $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture

    $obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber

    $obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser

    $obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber

    $obj | Add-Member Noteproperty ProductKey -value $productkey

    $obj

    }

    }




    Set-ExecutionPolicy RemoteSigned




    Import-Module C:\Users\$env:UserName\Desktop\Untitled1.ps1; Get-WindowsKey



    I get a different product key as well. Thanks for the help.

    :)
     
    RahulKC2599, Jul 3, 2019
    #1

  2. PowerShell scripts not working with Call operator

    Hi,



    Thank you for writing to Microsoft Community Forums.



    I understand that you are facing issues while developing a PowerShell script using the Call operator. I would suggest you to refer the articles

    The Windows PowerShell ISE
    .



    However, as the issue is related to developing PowerShell scripts, I would suggest you to post your query on

    MSDN forums
    , where we have expertise and developers who are well equipped with the knowledge of developing PowerShell scripts in Windows.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Jul 3, 2019
    #2
  3. Receiving the same product key from two different PC

    So I have a Desktop and a Laptop with two different product keys from Windows 8.1. I upgraded my Laptop, found the product key in the motherboard, and did a clean install using a different SSD. I did the same on my desktop, but I'm receiving the same product
    key that was given on my laptop. I cannot do a clean install on my desktop because the product key is the same as my laptop's. This would make my desktop inactivated and possibly be seen as a non-legit copy.

    What is causing the two different motherboards to have the same product key from two different device? I did the same to my Surface Pro 3 but got a different product key, resulting a legit clean install.
     
    ArkBautista, Jul 3, 2019
    #3
  4. Two product keys received from two different powershell scripts

    Powershell script

    Hi Muhammed DanishM S,

    Thank you for posting your question in the Microsoft Community Forums.

    I would like to let you know that the Windows PowerShell command-line and scripting language can be used to automate many Group Policy tasks, including configuring registry-based policy settings and various Group Policy Management Console (GPMC) tasks.

    Refer to this article to know more.

    Group Policy Cmdlets in Windows PowerShell

    For more information, I would suggest you to post your query in
    MSDN Forums
    , where we have developers and support professionals who are well-equipped with the knowledge on PowerShell
    scripts to assist you with your query.

    Regards,

    Srimadhwa B

    Microsoft Community-Moderator
     
    Srimadhwa_B, Jul 3, 2019
    #4
Thema:

Two product keys received from two different powershell scripts

Loading...
  1. Two product keys received from two different powershell scripts - Similar Threads - product keys received

  2. Two Computers Activated With The Same Product Key

    in Windows 10 Updates and Activation
    Two Computers Activated With The Same Product Key: I upgraded mine from Windows 10 Home, to Windows 10 Pro. Windows was oringally installed as fresh on both computers. Bother computers had their own product key. I have two Windows 7 Ultimate key, which I used to upgrade my Windows 10. Yesterday, while working on my Sister's...
  3. Two users, two different environments on a laptop

    in User Accounts and Family Safety
    Two users, two different environments on a laptop: Likely a newbie question... I don't have a laptop so I can't check right now. Windows 10 x64 Pro two users. Is it possible to have two environments / desktops (maybe something like admin and guest?) on a laptop? which desktop showing up depending on the login credentials?...
  4. Two different user folders?

    in User Accounts and Family Safety
    Two different user folders?: It seems like I have 2 users folders One with path C:\Users\[username] and the other [username] I only notice this if I pin the user folder to Quick Access. Pictures attached. 48467
  5. Different Product Keys?

    in Windows 10 Updates and Activation
    Different Product Keys?: Would appreciate your help. *Smile Have an Acer with a COA showing the product key for Windows 7. Ran Belarc Advisor, and it shows a different Product key for Windows 7. Any clues as to why he PKs do not match? Also, planning to install Windows 10 Home, and...
  6. Two (little) different BSOD in two days.

    in Windows 10 BSOD Crashes and Debugging
    Two (little) different BSOD in two days.: Hi, Two (little) different BSOD in two days. The first yesterday while I was not using the PC (but many apps open), I heard him restart. I checked the memory, no problem. I checked all my drives, no problem, I installed the latest AMD drivers and today I got the second...
  7. Same product key on two PCs

    in Windows 10 Updates and Activation
    Same product key on two PCs: Hi there. Within the last two days I upgraded a PC and a laptop to Windows 10 home as part of the free upgrade program. Just noticed tonight that Windows assigned the same product key to each PC. How is that possible? Why would Microsoft do that? I had no control over which...
  8. OMG, two Windows with one product key???

    in Windows 10 Updates and Activation
    OMG, two Windows with one product key???: Hi all, I am astonished... I bought a laptop with Win 10 Home and I get a rid of it and installed TWO Win 10 Pro. I activated the first with a fresh product key that I bought some days ago. Everything went fine. I start the SECOND copy of Win 10 Pro, didn't...
  9. Winver shows two different versions on two machines

    in Windows 10 Support
    Winver shows two different versions on two machines: I have Win 10 installed on two machines. The first, an HP Laptop, came from the factory with W10 and quickly updated itself to version 1511 OSbuild 10586 according to Winver. The second, a Dell Destop, was updated from Win 7 to Win 10 back in December and after the...
  10. Two installs, different results

    in Windows 10 Installation and Upgrade
    Two installs, different results: Hi I have two PC's with W10 Pro, fully updated. When I click the Start button there is a most used section, on one PC there is a list showing the most recent targets, on the other just the program is shown. Why the difference and how do I get the recent targets to...