Updates framework to use new WMI/Cim wrapper

Implements #80
This commit is contained in:
Lord Hepipud 2020-07-27 11:45:02 +02:00
parent 64a7724340
commit 5ba5261c8b
3 changed files with 4 additions and 4 deletions

View file

@ -35,4 +35,4 @@ labels:
<!--- Include as many relevant details about the environment you experienced the problem in -->
* 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`):

View file

@ -1,6 +1,6 @@
function Get-IcingaNetbiosName()
{
$ComputerData = Get-WmiObject Win32_ComputerSystem;
$ComputerData = Get-IcingaWindowsInformation Win32_ComputerSystem;
return $ComputerData.Name;
}

View file

@ -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) {