added server 2022 logic

This commit is contained in:
2021-11-14 12:07:30 -05:00
parent 365b3127eb
commit e2a3602d23

View File

@@ -66,7 +66,10 @@ if ($osType.ProductType -gt 1) {
} else {
if ($osInfo.WindowsProductName -eq "Windows Server 2019 DataCenter") {
if ($osInfo.WindowsProductName -eq "Windows Server 2022 DataCenter") {
# windows Server 2022 Datacenter
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33
} elseif ($osInfo.WindowsProductName -eq "Windows Server 2019 DataCenter") {
# windows Server 2019 Datacenter
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk WMDGN-G9PQG-XVVXX-R3X43-63DFG
} elseif ($osInfo.WindowsProductName -eq "Windows Server 2016 DataCenter") {