diff --git a/checkmk.sh b/checkmk.sh index 17946d8..70faf35 100644 --- a/checkmk.sh +++ b/checkmk.sh @@ -22,7 +22,7 @@ else OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}') fi -if [ "${VM}" == "vmware" ]; then +if [ "${VM}" == "vmware" ] || [ "${VM}" == "kvm" ] ; then VM="true" else VM="false" diff --git a/kms.ps1 b/kms.ps1 index bc856b7..9e97967 100644 --- a/kms.ps1 +++ b/kms.ps1 @@ -56,10 +56,10 @@ $osType = Get-WmiObject -Class Win32_OperatingSystem $osInfo = Get-ComputerInfo 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 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 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") { @@ -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") { $officePath = "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" } -if ($officePath -ne $null) { +if ($null -ne $officePath) { # Office 2024 LTSC c:\Windows\System32\cscript.exe /nologo "$officePath" /inpkey:XJ2XN-FW8RK-P4HMP-DKDBV-GCVGB # Project Pro 2024 LTSC diff --git a/zabbix_agent.sh b/zabbix_agent.sh index 1c99289..9bbd7d2 100644 --- a/zabbix_agent.sh +++ b/zabbix_agent.sh @@ -23,7 +23,7 @@ else OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}') fi -if [ "${VM}" == "vmware" ]; then +if [ "${VM}" == "vmware" ] || [ "${VM}" == "kvm" ] ; then VM="true" else VM="false"