It would be nice for my client to have this upgrade from Windows 10 Home or pro to Enterprise. If we can get this added ASAP that would be awesome.
Doesn’t that happen when the machine is Azure joined already?
Nevertheless, there is already a Home to Pro task that requires a key that I wrote. I imagine something can be done similarly, but I don’t think many people are upgrading people to enterprise with keys (I know we arent).
The customer has a enterprise key in which when I tried to run the pro it failed with verifying the script it executed and looks like from my test machine correctly so was wondering if the script can be made for the enterprise with the key?
This is what I use for migrating Pro to Education. I don’t know about migrating from Home to something else… I suspect that’s a special case but it might work. The keys in the script the generic KMS keys (in case anyone doesn’t recognise them and freaks out that I posted customer keys :), if you have an actual key you can use that. It probably works on Windows 11 except for the KMS keys.
Task looks like this, and code is below
$TestResult = $true
$CurrentEdition = (Get-WindowsEdition -Online).Edition
if ($CurrentEdition -ne $TargetEdition) {
Write-Warning "Current Edition $CurrentEdition is not equal to Target Edition $TargetEdition"
$TestResult = $false
} else {
Write-Host "Current Edition $CurrentEdition matches Target Edition $TargetEdition"
}
switch ($method) {
"test" {
return $TestResult
}
"set" {
if ($ProductKey -eq $null) {
$key_table = @{
"Professional" = @{
"Microsoft Windows NT 10.*" = "W269N-WFGWX-YVC9B-4J6C9-T83GX"
}
"Education" = @{
"Microsoft Windows NT 10.*" = "NW6C2-QMPVW-D7KKK-3GKT6-VCFB2"
}
"Enterprise" = @{
"Microsoft Windows NT 10.*" = "NPPR9-FWDCX-D2C8J-H872K-2YT43"
}
}
$os_version = [Environment]::OSVersion.VersionString
$key_table[$TargetEdition].Keys | ? { $os_version -like $_} | % {
$ProductKey = $key_table[$TargetEdition][$_]
}
}
# No powershell equivalent - have to go old school slmgr.vbs
& cscript slmgr.vbs /ipk $ProductKey
& cscript slmgr.vbs /ato
return
}
"get" {
return
}
}
Use this new script and test it? Do I need to change any fields at all or copy and paste it?
This is not working can you help me with this and what info do you need for troubleshooting?
Are you sure the key isn’t at its maximum activations?