Share via


WmiClassToInventoryReportInstance.WmiClassToInventoryInstances Method (String, String, String, String, String, NetworkCredential)

 

Connects to WMI on a remote machine with the specified credentials and gets the WMI instances from a class.

Namespace:   Microsoft.ConfigurationManagement.Messaging.Messages
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)

Syntax

public static InventoryInstance[] WmiClassToInventoryInstances(
    string hostName,
    string scope,
    string wmiClass,
    string spoofNamespace,
    string spoofWmiClass,
    NetworkCredential credentials
)
public:
static array<InventoryInstance^>^ WmiClassToInventoryInstances(
    String^ hostName,
    String^ scope,
    String^ wmiClass,
    String^ spoofNamespace,
    String^ spoofWmiClass,
    NetworkCredential^ credentials
)
Public Shared Function WmiClassToInventoryInstances (
    hostName As String,
    scope As String,
    wmiClass As String,
    spoofNamespace As String,
    spoofWmiClass As String,
    credentials As NetworkCredential
) As InventoryInstance()

Parameters

  • hostName
    Type: System.String

    The name of the host to connect to. If this value is null, localhost is used.

  • scope
    Type: System.String

    The namespace to connect to. This value is required.

  • wmiClass
    Type: System.String

    The WMI class. This value is required.

  • spoofNamespace
    Type: System.String

    Overrides the WMI namespace in the inventory with this value. If this value is not defined, the value for scope is used.

  • spoofWmiClass
    Type: System.String

    Overrides the WMI class in the inventory with this value. If this value is not defined, the value for wmiClass is used.

  • credentials
    Type: System.Net.NetworkCredential

    Credentials for connecting to the remote host. If this value is null, no credentials are used. If hostName is null, this parameter is ignored.

Return Value

Type: Microsoft.ConfigurationManagement.Messaging.Messages.InventoryInstance[]

See Also

WmiClassToInventoryInstances Overload
WmiClassToInventoryReportInstance Class
Microsoft.ConfigurationManagement.Messaging.Messages Namespace

Return to top