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.StringThe name of the host to connect to. If this value is null, localhost is used.
scope
Type: System.StringThe namespace to connect to. This value is required.
wmiClass
Type: System.StringThe WMI class. This value is required.
spoofNamespace
Type: System.StringOverrides the WMI namespace in the inventory with this value. If this value is not defined, the value for scope is used.
spoofWmiClass
Type: System.StringOverrides 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.NetworkCredentialCredentials 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