[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Retrieves instances from WMI

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

Syntax

                 
  C#     Visual Basic     Visual C++  
public 
static 

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()
public:
static 
array<

InventoryInstance^>^ 
WmiClassToInventoryInstances(
	
String^ 
hostName, 
	
String^ 
scope, 
	
String^ 
wmiClass, 
	
String^ 
spoofNamespace, 
	
String^ 
spoofWmiClass, 
	
NetworkCredential^ 
credentials
)

Parameters

hostName
String
hostname to connect to -- if null, uses localhost
scope
String
namespace to connect to, required
wmiClass
String
wmi class, required
spoofNamespace
String
overrides in the inventory the WMI namespace with value selected here, if not defined, scope will be used
spoofWmiClass
String
overrides in the inventory the WMI class with value selected here, if not defined, wmiClass will be used
credentials
NetworkCredential
credentials for connecting to remote hostname -- if null, uses no credentials. Ignored if hostName is null

See Also