WmiClassToInventoryReportInstance.WmiClassToInventoryInstances Method (String, String, String, String, String)
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 userName,
string password
)
public:
static array<InventoryInstance^>^ WmiClassToInventoryInstances(
String^ hostName,
String^ scope,
String^ wmiClass,
String^ userName,
String^ password
)
Public Shared Function WmiClassToInventoryInstances (
hostName As String,
scope As String,
wmiClass As String,
userName As String,
password As String
) 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.
userName
Type: System.StringThe user name.
password
Type: System.StringThe password for the user provided in userName.
Return Value
Type: Microsoft.ConfigurationManagement.Messaging.Messages.InventoryInstance[]
See Also
WmiClassToInventoryInstances Overload
WmiClassToInventoryReportInstance Class
Microsoft.ConfigurationManagement.Messaging.Messages Namespace
Return to top