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 separate users on two different drives

    in Windows 10 Gaming
    Two separate users on two different drives: Hello, I have a question about separating user data on windows. Is there a way to allow a member of my family to store all of their user data, downloads, documents, etc. onto a separate drive? Ideally, everything of theirs would be located on this second drive because they...
  3. Two separate users on two different drives

    in Windows 10 Software and Apps
    Two separate users on two different drives: Hello, I have a question about separating user data on windows. Is there a way to allow a member of my family to store all of their user data, downloads, documents, etc. onto a separate drive? Ideally, everything of theirs would be located on this second drive because they...
  4. Two PCs but two different internet speeds

    in Windows 10 Network and Sharing
    Two PCs but two different internet speeds: I get on about 450Mbps on my several Dell Windows 10 PCs. However, one of my Dell PCs is running Windows 7. The speed on it is about 8Mbps. All of the PCs are networked via Cat5 cables. My iPhones see about 100Mbps wireless of course.So is it Windows 7 that causes the...
  5. I have two product keys to same Microsoft account on two different machines

    in Windows 10 Updates and Activation
    I have two product keys to same Microsoft account on two different machines: Hello,I have two product keys to same Microsoft account on two different machines one on my laptop and one on my PC, is it OK?i mean i log in with my same Microsoft account on my two different computers one windows home and one windows pro ....
  6. Two different PowerShell font settings...

    in Windows 10 Software and Apps
    Two different PowerShell font settings...: If I open PowerShell from the Start Menu (or pinned app), it opens with font size 14 and Consolas... if I open it from Shift+right-click on a folder (or while in a folder), it opens with font size 16 and Lucida Console. Changing these settings stays with them. I don't know...
  7. Two different problems reported by two different browsers for Outlook.

    in Browsers and Email
    Two different problems reported by two different browsers for Outlook.: This started about three days ago and is consistent with Microsoft Edge and hit or miss with Firefox, except that Firefox has the option to accept the risk and continue on to sign-in. Both browsers are fully up to date but the funny thing is, my smart phone uses the same...
  8. 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?...
  9. 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...
  10. 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...