diff --git a/.github/ISSUE_TEMPLATE/create-new-issue.md b/.github/ISSUE_TEMPLATE/create-new-issue.md index 56622d4..7eefcd4 100644 --- a/.github/ISSUE_TEMPLATE/create-new-issue.md +++ b/.github/ISSUE_TEMPLATE/create-new-issue.md @@ -35,4 +35,4 @@ labels: * PowerShell Version used (`$PSVersionTable.PSVersion`): -* Operating System and version (`Get-WmiObject Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption`): +* Operating System and version (`Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption`): diff --git a/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 b/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 index 3414891..b222eef 100644 --- a/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 +++ b/lib/core/icingaagent/getters/Get-IcingaNetbiosName.psm1 @@ -1,6 +1,6 @@ function Get-IcingaNetbiosName() { - $ComputerData = Get-WmiObject Win32_ComputerSystem; + $ComputerData = Get-IcingaWindowsInformation Win32_ComputerSystem; return $ComputerData.Name; } diff --git a/lib/core/tools/Get-IcingaServices.psm1 b/lib/core/tools/Get-IcingaServices.psm1 index 4f744fa..deed44e 100644 --- a/lib/core/tools/Get-IcingaServices.psm1 +++ b/lib/core/tools/Get-IcingaServices.psm1 @@ -9,9 +9,9 @@ function Get-IcingaServices() $ServiceWmiInfo = $null; if ($Service.Count -eq 0) { - $ServiceWmiInfo = Get-WmiObject Win32_Service; + $ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service; } else { - $ServiceWmiInfo = Get-WmiObject -Class Win32_Service | Where-Object { $Service -Contains $_.Name } | Select-Object StartName, Name; + $ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service | Where-Object { $Service -Contains $_.Name } | Select-Object StartName, Name; } if ($null -eq $ServiceInformation) {