Windows Server - Getting Cluster Virtual Name with Cluster.exe

Asked By JayDee
01-Dec-07 02:23 PM
I need to gather the virtual name of our cluster servers from a remote
server. I tried the following command, hoping it would return the
virtual cluster name:



but it only returned this:

T  Resource Type        Name                           Value
-- -------------------- ------------------------------
-----------------------
SR Network Name         DllName                        clusres.dll
S  Network Name         Name                           Network Name
S  Network Name         Description
S  Network Name         DebugPrefix
D  Network Name         DebugControlFunctions          0 (0x0)
M  Network Name         AdminExtensions                {4EC90FB0-
D0BB-11CF-B5EF-
00A0C90AB505}
D  Network Name         LooksAlivePollInterval         5000 (0x1388)
D  Network Name         IsAlivePollInterval            60000 (0xea60)


What's up with the "Network Name" Name being "Network Name" and not
the virtual name?

Please help. Thanks!

JayDee
StatusNetBIOS
(1)
LooksAlivePollInterval
(1)
IsAlivePollInterval
(1)
RequireDNS
(1)
StatusDNS
(1)
CoreCurrentName
(1)
RemapPipeNames
(1)
RequireKerberos
(1)
  Edwin vMierlo [MVP] replied...
30-Nov-07 03:40 AM
try /PRIV in stead of /PROP
  John Toner [MVP] replied...
30-Nov-07 02:40 PM
Well, you're looking at the "Network Name" "resource type" instead of a
specific resource in your cluster. As Edwin suggests, if you look at the
private properties of your "Cluster Name" resource, it should show the Name
value of the cluster:

C:\>cluster res "Cluster Name" /priv

Listing private properties for 'Cluster Name':

T  Resource             Name                           Value
-- -------------------- ------------------------------ ---------------------
--
BR Cluster Name         ResourceData                   ... (0 bytes)
DR Cluster Name         StatusNetBIOS                  0 (0x0)
DR Cluster Name         StatusDNS                      0 (0x0)
DR Cluster Name         StatusKerberos                 0 (0x0)
SR Cluster Name         CreatingDC
S  Cluster Name         Name                           MSCLUS
D  Cluster Name         RemapPipeNames                 0 (0x0)
D  Cluster Name         RequireDNS                     0 (0x0)
D  Cluster Name         RequireKerberos                0 (0x0)


C:\>

Regards,
John

Visit my blog: http://msmvps.com/blogs/jtoner
  JayDee replied...
13-Dec-07 12:42 AM
On Nov 30, 11:40 am, "John Toner [MVP]" <jto...@DIE.SPAM.DIE.mvps.org>

Here's the problem. Unfortunately the "Cluster Name" resource was
changed to reflect the name of the cluster, so I can't search for the
resource called "Cluster Name" - I would have to be able to do it by
the Resource Type, which is consistantly called "Network Name" - or
some other consistant value. Any ideas?

Thanks

- JayDee
  Edwin vMierlo [MVP] replied...
13-Dec-07 04:43 AM
Assuming that your default Cluster Group is still called "Cluster Group"

you need to script a bit

1) first get all resources of the "Cluster Group"
2) enumerate and query each one of them for type
3) select the one with type "Network Name"
4) get the name of the resource, then get the /priv

Another way is to look at the registry of a clustered node
1) query that clussvc.exe (cluster service) is running, once it is running
it must have loaded the cluster hive
2) look at this value HKEY_LOCAL_MACHINE\Cluster\ClusterName    REG_SZ

this should be your cluster name,

or enumerate your registry to find this

HKEY_LOCAL_MACHINE\Cluster\Resources\30e05fb8-d68e-49b6-8212-883adb8c31b5\Co
reCurrentName REG_SZ
(the GUID is an example, this differs from cluster to cluster)

there is only one resource of the type "Network Name" which has a REG_SZ
CoreCurrentName
(which by the way should 100% match HKEY_LOCAL_MACHINE\Cluster\ClusterName)

and all that is your cluster name...

rgds,
Edwin.
Create New Account
help