Windows Product Key per Powershell auslesen

by ChristianH März 06, 2010 15:19

GetProductKey.ps1

$map="BCDFGHJKMPQRTVWXY2346789"
$value = (get-itemproperty "HKLM:\\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
).digitalproductid[0x34..0x42] 
$ProductKey = "" 
for ($i = 24; $i -ge 0; $i--
) {
  $r =
0
  for ($j = 14; $j -ge 0; $j--
) {
    $r = ($r * 256) -bxor $value[$j
]
    $value[$j] = [math]::Floor([double]($r/
24))
    $r = $r %
24
  }
  $ProductKey = $map[$r] +
$ProductKey
  if (($i % 5) -eq 0 -and $i -ne
0) {
    $ProductKey = "-" +
$ProductKey
  }
}
echo "Product Key:" $ProductKey

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

Scripting

Kommentare

06.07.2010 23:24:00 #

dirk

cool.. es scheint zu funktionieren. danke.

dirk Germany

21.02.2011 11:20:15 #

Roger

Leider funktioniert das bei Server 2008 R2 nicht, da kommen nur BBBBB-BBBBB-BBBBB-BBBBB-BBBBB raus.

Roger Germany

21.02.2011 12:35:03 #

Roger

In der "digitalProductID" stehen von 34 bis 42 nur low-Value, daher kann das Ermitteln auch so nicht funktionieren. Frage ist aber, wo MS das jetzt versteckt hat

Roger Germany

07.08.2011 02:33:37 #

cheap fake watches

I'd favor to many thanks for the efforts you may have made in producing this submit. I am hoping the really very same most effective perform from you within the lengthy phrase as properly.

cheap fake watches United States

26.09.2011 16:27:10 #

Jeans

HEY ICH HAB ALLES VERSUCHT

DA KOMMT NUR BLA BLA SCHEINT EIN STANDARD KEY ZU SEIN...

der ganze stress hier nur weil ich meinen sch.... key net mehr lesen kann..... so ein müll ey

Jeans Germany

23.10.2011 01:29:43 #

dc

scheint zu funktionieren, vielen dank dafür Smile

dc Germany

25.10.2011 15:02:55 #

Testen

Es Macht richtig Spaß euren Blog zu lesen, macht weiter so.

Testen United States

17.11.2011 15:31:17 #

Jae Trott

I  conceive other website owners  should take this  internet site  as an example , very clean and good  user  pleasant  style . "When we lose one blessing, another is often, most unexpectedly, given in its place." by Clive Staples Lewis.

Jae Trott United States

22.11.2011 16:29:03 #

kursus hipnoterapi

hello!,I really like your writing so a lot! share we keep in touch extra about your post on AOL? I require an expert in this space to unravel my problem. Maybe that's you! Having a look ahead to peer you.

kursus hipnoterapi United States

17.12.2011 15:52:25 #

Mambaboa

Gut

Mambaboa Germany

27.12.2011 09:36:16 #

seo service for law firms

I am delighted that I came upon this blog, I could not discover any information on this topic prior to visiting your post. Thanks God I came across on this blog and found the relevant information.

seo service for law firms United States

28.12.2011 17:10:24 #

Ketryn

hallo, was muss ich den da eingeben damit mein productkey angezeigt wird.. ich bin verzweifelt.. =(

Ketryn Germany

19.01.2012 00:14:58 #

reading pillow

Quite a few thanks for making the effort to go more than this, I'm strongly relating to it as well as adore studying more on this certain subject matter. When doable, as you acquire encounter, could you head modernizing your blog with much more data? It is actually quite of wonderful support for us.

reading pillow United States

Kommentar schreiben


(Zeigt dein Gravatar icon)

  Country flag

biuquote
  • Kommentar
  • Live Vorschau
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen | Modified by Mooglegiant

Facebook

Über den Autor

MCTS

Christian Haberl Christian Haberl ist seit mehr als 10 Jahren als EDV Berater, Vortragender und Trainer tätig. Er kann sich nicht für ein Spezialgebiet entscheiden, drum heißt dieser Blog auch "Kraut & Rüben Blog" - Unter seine Interessen fallen Web-Entwicklung auf ASP.NET Basis, Information Worker & Productivity Technologien (Windows, Office), Server (Windows Server, Small Business, Virtualisierung, Exchange), Scripting, Spam Filtering/Security und Digital Home. Christian Haberl ist auch einer der führenden Produktspezialisten für Windows Media Center und Windows Home Server und ist Direktor des ClubDigitalHome.
Im Jahr 2008 hat Christian Haberl über 200 Vorträge und Schulungen durchgeführt.
Im Frühjahr 2009 wurde Christian Haberl von Microsoft Österreich zum "Influencer" ernannt, weiters wurde er Microsoft Certified Technology Specialist / Microsoft Certified Connected Home Integrator sowie Microsoft Certified Consumer Sales Specialist.


Netzwerk Management

Bandwidth

RecentComments

Comment RSS