How can I get Windows Product Key from Active Directory Users Machine

Dear all,  How can I get Windows Product Key from Active Directory Users Machine via power shell or any tools?  In our company, we have 300 PC. Somehow they lost Windows product keys. So now they want all users machine windows product keys. Is it not possible to go physically all end users and in that case i can't use also key finder software. Company authority assigned me to find a way get windows product key for all machines but I am unable to find this. Any one can help me about this.Thanks in advanced.

 

Thanks

Hosen

 

 

 

  • The Windows Product key is not stored in Active Directory. It is stored in the registry on each machine. It is not stored in a readable format. However, if you search you will find scripts that will extract the Product Key from the registry.

  • I don't know what management's intent is, but this is not as straightforward as I'm sure they assumed.  This is why customers buy solutions like Microsoft's SCCM, or Network Inventory Advisor, or Spiceworks (free), etc.  Keep in mind that software is per machine, not user.  So it's a little misguided to "align" software to users.

    So you really need to have the conversation with management as to what the end goal is, otherwise you're going to waste a lot of time and not get to what they want.  Ideally it should fit into existing tools you already use.  That said, I'm not sure PowerShell is going to get you there quickly or painlessly.  And as Sean mentioned, the key is not in "clear text".

    If their goal is to move software around so it's used fully before buying more, that's admirable.  Make sure you understand the licensing. 

    • If you buy a PC from Dell with MS Office installed, that is an OEM license that cannot be transferred to another machine. 
    • Sapien's PowerShell Studio allows me to install it on two machines, as long as I am the exclusive user (can't be shared with another user). 
    • RegEx Buddy's single-user license allows unlimited users on a single machine, or a single user on unlimited machines. 

    Just another wrinkle in this whole mess.

    Bob.

  •  In our company, we have 300 PC. Somehow they lost Windows product keys. So now they want all users machine windows product keys. Is it not possible to go physically all end users and in that case i can't use also key finder software. Company authority assigned me to find a way get windows product key for all machines but I am unable to find this.

  • So essentially you want to ...

    • Generate a list of computers from AD (or manually)
    • Iterate over that list to contact each computer
    • Retrieve and decipher the Windows product key
    • Record that info somewhere

    The good news is that there are dozens of scripts out there that you can use.  Do a Bing/Google search on "powershell find windows product key" or something similar.  There is no point in generating "new" code to do this.

    Use your Google Fu.

    NOTE:  This will probably use WMI as the underlying technology (depending on the script you choose) to gather the information from the workstations.  That may or may not work in your environment depending on firewall settings.  Using CIM_Instance instead will probably not work in your environment since it requires PSRemoting to be enabled, which is rare in most organizations.

    In the meantime you should still be thinking about making a case for a real asset management system.

  • Now it's probably the best time to purchase a volume license and install license activation server :)) 

  • In reply to nohandle:

    One of the Best Product Key Finder Tools which I know are
    1. ProduKey
    2. SterJo Key Finder
    3. Belarc Advisor
    4. Free PC Audit 2.1
    5. Magical Jelly Bean Keyfinder
    source:- merabheja.com/.../