Name Property
Name Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The Name property returns the name of the Microsoft Exchange cluster resource. The Name property is read-only, and is a key property of this class.
Applies To
The Name property is a member of the ExchangeClusterResource Class.
Instance Path
The Name property appears on instances of the \\COMPUTERNAME\ROOT\cimv2\applications\exchange:ExchangeClusterResource class.
MOF Syntax
[key] string Name;
Qualifiers
key
Remarks
For more information about Microsoft Windows Clustering technologies, see the MSDN Web site .
VBScript Example
The following example shows how to retrieve a list of ExchangeClusterResource instances on the specified Exchange server, and how to retrieve the Name property on each ExchangeClusterResource instance.
'=============================================================== ' Name: ShowClusterResource_Name ' Purpose: Display each Cluster member found for Exchange server, ' and show the Name property on the ' ExchangeClusterResource objects ' Input: strComputerName [string] the computer to access ' Output: Displays the name of each Connector and the ' Name property '=============================================================== Public Sub ShowClusterResource_Name ( strComputerName ) Const cWMINameSpace = "root/cimv2/applications/exchange" Const cWMIInstance = "ExchangeClusterResource" Dim strWinMgmts ' Connection string for WMI Dim objWMIExchange ' Exchange Namespace WMI object Dim listClusterResources ' ExchangeClusterResource collection Dim objExchangeConnector ' A single ExchangeClusterResource WMI object ' Create the object string, indicating WMI (winmgmts), using the ' current user credentials (impersonationLevel=impersonate), ' on the computer passed to the function in strComputerName, and ' using the CIM namespace for the Exchange provider. strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & _ strComputerName & "/" & cWMINameSpace ' ' Get an object using the string you just created. Set objWMIExchange = GetObject(strWinMgmts) ' ' The Resources that currently exist appear as a list of ' ExchangeClusterResource instances in the Exchange namespace. Set listClusterResources = objWMIExchange.InstancesOf(cWMIInstance) ' ' Were any ExchangeClusterResource Instances returned? if (listClusterResources.count > 0) then ' If yes, do the following: ' Iterate through the list of ExchangeClusterResource objects. For each objExchangeConnector in listClusterResources ' ' Display the value of the Name property. WScript.echo "Name = " & _ "[" & TypeName(objExchangeConnector.Name) & "] " & _ objExchangeConnector.Name ' ' Move to the next ExchangeClusterResource. Next else ' If no ExchangeClusterResource instances were returned, ' display that. WScript.Echo "No ExchangeClusterResource instances were returned." end if end Sub
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
This topic last updated: June 2006
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.