diff --git a/tools/collector-generator/New-Collector.ps1 b/tools/collector-generator/New-Collector.ps1 index d926d277b..43944386d 100644 --- a/tools/collector-generator/New-Collector.ps1 +++ b/tools/collector-generator/New-Collector.ps1 @@ -11,10 +11,10 @@ Param( $ErrorActionPreference = "Stop" if($Credential -ne $null) { - $wmiObject = Get-WMIObject -ComputerName $ComputerName -Credential $Credential -Class $Class + $wmiObject = Get-CimInstance -ComputerName $ComputerName -Credential $Credential -Class $Class } else { - $wmiObject = Get-WMIObject -ComputerName $ComputerName -Class $Class + $wmiObject = Get-CimInstance -ComputerName $ComputerName -Class $Class } $members = $wmiObject `