![]() ![]() I have tested this on Windows Server 2012 R2 (and was actually able to install Windows Server 2012 R2 as a VM with the key that was returned), and I have tested this on Windows 10 which will return VK7JG-NPHTM-C97JM-9MPGT-3V66T which is a generic key that anybody who has Windows 10 will get when running a key finder on their machine, see for more information on that. ![]() $ProductKey = $ProductKey.Insert($i, '-') C:\WINDOWS\system32\WindowsPowerShell\v1. The path to that location is seen here: Start Menu\Programs\Accessories\Windows PowerShell As for the executables, they are placed under the system32 folder. $ProductKey = $ProductKey.Insert($r, 'N') When Windows PowerShell is installed, it creates a folder on the Start menu under Accessories. Write-Verbose (": Translating data into product key" -f $Computer) You will also notice that I set the type for Computername to ] which means that it will take a collection of strings for that parameter. Go to the PC that has Office 2013 installed Right click the Windows icon and select Command Prompt. I also add some aliases to support the ValueFromPipeLineByPropertyName which allows extra pipeline support. Find the Office 2013 product key associated with your PC First, find the last five digits of the product key associated with your computer. I also add some parameters to the existing code with a default parameter value for the Computername to point to the local machine. ![]() Computername, ProductKey,OSDescription,OSVersionįirst off, lets add some comment based help to this code:.In the object, show the following properties.Allow this function to query remote systems not just locally you can get the last 5 digits by using these commands: 32 bit office on 64 bit os cscript 'C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS' /dstatus 64 bit office on 64 bit os cscript 'C:\Program Files\Microsoft Office\Office16\OSPP.The list of items I wanted to add to the existing code are: By doing this, you can see just how easy it is to take some existing code and modify it to meet your own specific requirements. For script type select Online Shell Script. However, being that I had a little free time and really like this code, I wanted to enhance it to make it more robust by adding a few extra things here and there. Next thing we need to do is go to the scripting module and a new script. $value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid
0 Comments
Leave a Reply. |