Merge branch 'master' of https://git.johnhgaunt.com/jgaunt/homelab-scripts
This commit is contained in:
@@ -22,7 +22,7 @@ else
|
|||||||
OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}')
|
OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${VM}" == "vmware" ]; then
|
if [ "${VM}" == "vmware" ] || [ "${VM}" == "kvm" ] ; then
|
||||||
VM="true"
|
VM="true"
|
||||||
else
|
else
|
||||||
VM="false"
|
VM="false"
|
||||||
|
|||||||
6
kms.ps1
6
kms.ps1
@@ -56,10 +56,10 @@ $osType = Get-WmiObject -Class Win32_OperatingSystem
|
|||||||
$osInfo = Get-ComputerInfo
|
$osInfo = Get-ComputerInfo
|
||||||
|
|
||||||
if ($osType.ProductType -eq 1) {
|
if ($osType.ProductType -eq 1) {
|
||||||
if ($osInfo.WindowsProductName -match "Windows 10 Enterprise LTSC 20[19|21|24]") {
|
if ($osInfo.WindowsProductName -match "Windows 10 Enterprise LTSC 20(19|21|24)") {
|
||||||
# Windows 10/11 2019/2021/2024 LTSC
|
# Windows 10/11 2019/2021/2024 LTSC
|
||||||
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D
|
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D
|
||||||
}elseif ($osInfo.WindowsProductName -match "Windows 10 IoT Enterprise LTSB 20[19|21|24]") {
|
}elseif ($osInfo.WindowsProductName -match "Windows 10 IoT Enterprise LTSC 20(19|21|24)") {
|
||||||
# Windows 10/11 IoT 2019/2021/2024 LTSC
|
# Windows 10/11 IoT 2019/2021/2024 LTSC
|
||||||
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk KBN8V-HFGQ4-MGXVD-347P6-PDQGT
|
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk KBN8V-HFGQ4-MGXVD-347P6-PDQGT
|
||||||
} elseif ($osInfo.WindowsProductName -eq "Windows 10 Enterprise LTSB 2016") {
|
} elseif ($osInfo.WindowsProductName -eq "Windows 10 Enterprise LTSB 2016") {
|
||||||
@@ -102,7 +102,7 @@ if (test-path "C:\Program Files\Microsoft Office\Office16\ospp.vbs") {
|
|||||||
} elseif (test-path "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs") {
|
} elseif (test-path "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs") {
|
||||||
$officePath = "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs"
|
$officePath = "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs"
|
||||||
}
|
}
|
||||||
if ($officePath -ne $null) {
|
if ($null -ne $officePath) {
|
||||||
# Office 2024 LTSC
|
# Office 2024 LTSC
|
||||||
c:\Windows\System32\cscript.exe /nologo "$officePath" /inpkey:XJ2XN-FW8RK-P4HMP-DKDBV-GCVGB
|
c:\Windows\System32\cscript.exe /nologo "$officePath" /inpkey:XJ2XN-FW8RK-P4HMP-DKDBV-GCVGB
|
||||||
# Project Pro 2024 LTSC
|
# Project Pro 2024 LTSC
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ else
|
|||||||
OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}')
|
OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${VM}" == "vmware" ]; then
|
if [ "${VM}" == "vmware" ] || [ "${VM}" == "kvm" ] ; then
|
||||||
VM="true"
|
VM="true"
|
||||||
else
|
else
|
||||||
VM="false"
|
VM="false"
|
||||||
|
|||||||
Reference in New Issue
Block a user