Comments (8)
I think it could be hard to automate, because the use case is for every user/customer different.
--> if you need this activation, you can simply extend your code with these lines:
https://github.com/AkosBakos/OSDCloud/blob/main/Install-EmbeddedProductKey.ps1
from osd.
Thank you, i will test it, I assume we use it by adding a line
Invoke-Expression (Invoke-WebRequest -Uri "https://github.com/AkosBakos/OSDCloud/blob/main/Install-EmbeddedProductKey.ps1" -UseBasicParsing).Content
Correct?
from osd.
Or simply like that:
Start-Process PowerShell -ArgumentList "-NoL -C Invoke-WebPSScript "https://github.com/AkosBakos/OSDCloud/blob/main/Install-EmbeddedProductKey.ps1" -Wait
from osd.
Or simply like that:
Start-Process PowerShell -ArgumentList "-NoL -C Invoke-WebPSScript "https://github.com/AkosBakos/OSDCloud/blob/main/Install-EmbeddedProductKey.ps1" -Wait
I can confirm it works in windows, but doesn't seem to work in WinPE. Normal behavior?
In windows I ran the 1.cmd in system32 from his script and it worked.
from osd.
Check the log file: $env:ProgramData\Microsoft\IntuneManagementExtension\Logs\OSD\Install-EmbeddedProductKey.log
--> if the device has a HW license, it doesn't matter in which phase is getting executed.
from osd.
@AkosBakos, I believe in WinPE we will get Invalid class "SoftwareLicensingService"
Since i am using PowerShell and not CMD to run my script, I used these 2 lines of code.
$EmbeddedProductKey= "https://raw.githubusercontent.com/AkosBakos/OSDCloud/main/Install-EmbeddedProductKey.ps1"
Invoke-Expression (Invoke-WebRequest -Uri $EmbeddedProductKey-UseBasicParsing).Content
Here is the log file you requested. Tested on 2 Surface Books.
Here is how i have it implemented online on line 60.
https://github.com/Abe-Telo/ODSCloud-Missing-Microsoft-Drivers/blob/main/online.ps1
**********************
Transcript started, output file is X:\ProgramData\Microsoft\IntuneManagementExtension\Logs\OSD\2023-11-15-140536-Install-EmbeddedProductKey.log
Get embedded product key
Get-WmiObject : Invalid class "SoftwareLicensingService"
At line:5 char:9
+ $Key = (Get-WmiObject SoftwareLicensingService).OA3xOriginalProductKe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidType: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Get-WmiObject : Invalid class "SoftwareLicensingService"
At line:5 char:9
+ $Key = (Get-WmiObject SoftwareLicensingService).OA3xOriginalProductKe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidType: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
No embedded product key found.
**********************
from osd.
The OSD Module has functions for getting the embedded code, and for applying it to the OS.
https://github.com/OSDeploy/OSD/blob/master/Public/OSDCloudTS/Set-WindowsOEMActivation.ps1
It has worked pretty well for me in my process, applying the Key from older devices and activating Windows 11, but sadly I've had poor luck lately: https://www.zdnet.com/article/can-you-still-get-a-windows-10-upgrade-for-free/
Still works find on newer hardware.
If you OEMActivation = $true in your OSDCloud variables, it should automatically try to get the key and apply it for you.
See my OSDCloud script example: https://github.com/gwblok/garytown/blob/master/Dev/CloudScripts/win11.ps1
from osd.
Describe the solution you'd like It would be cool to get the Windows type based on the Embedded Windows Key from the bios. Such as Windows 10 Home, Pro, Enterprise, etc. It would be even cooler If the tool could tell us if the Product key can be used for Win 10 and Win 11.
I was thinking of even a step forward and filtering the Windows selection from the OSDCloudGUI Menu based on the product key.
What this resolves Sometimes I have Windows 10 Pro, But I install Home. Sometimes I want to downgrade from Windows 11 to 10, And not sure if the product key allows it.
Having something like this implemented can save alot of time.
I just looked back at the original request, which is different then what I was thinking.
While it's a cool idea, I don't know of a way to do a look up on the OEM code and get the OS it is for. If you know of a way to do this, let me know and I can see if I can work it into the process.
Today, the best way to do this would be to write a custom script to kick off OSDCloud, have it check for a list of models you image that are known to be Pro, and then have do something like
if (Activation -eq "Pro"){$Activation = "Pro"}
Else {$Activation = "Home"}
Then feed that into your Start-OSDCloud Command line.
Considering this Issue closed unless someone provides a method to do a lookup on the MS Activation Code in the Firmware.
from osd.
Related Issues (20)
- Unable to download driver from Microsoft Update Catalog HOT 9
- Missing latest Surface Models HOT 2
- WirelessConnect - Object is not set to an instance of an object. HOT 1
- DevGui - combobox for Edition is not working properly HOT 4
- Add method to update Store Apps automatically on first logon HOT 1
- Block-NoInternet function is providing false results HOT 4
- Lenovo failing to boot after driver installation HOT 1
- Link broken HOT 1
- Windows 11 23H2 Get-WindowsImage: The data is invalid HOT 3
- Saving OS and driverpacks to network share HOT 4
- SHA1 Hash Check of ESD file after download
- Start-OSDCloudGUI on HP Elitebook 860 G11 HOT 4
- Install all dot net feature updates durring install HOT 1
- Setup Complete Options for Start-OSDCloud with ZTI parameter HOT 1
- OSDCloud Azure is currently broken due to az account 3.00 HOT 2
- Multiple hard drive detection - M.2 nvme SSD/SATA SSD/HDD detection on main OSDCloud GUI with combo box HOT 5
- WinPE 10.1.26100.1 Error in Deployment phase Export HOT 3
- Using `Edit-OSDCloudWinPE -StartURL` breaks installation if the network is slow HOT 3
- case-insensitive HP DriverPack auto-detection via product HOT 2
- Length Error for HPCMSL HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osd.