How to find all file shares on a cluster?

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
pc_doctor
Posts: 61
Last visit: Tue Jan 03, 2012 4:22 am

How to find all file shares on a cluster?

Post by pc_doctor »

How would you format a WMI Query that returns all the file share resources on a Microsoft cluster server?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

How to find all file shares on a cluster?

Post by jvierra »

The cluster classes are in //root/MSCluster_Resource.


The shares on the cluster are just shares I believe. If you enumerate the shares then they are on the cluster.

To do it with WMI here is teh PowerSHell code (the easiest code)

Get-WmiObject -namespace rootmscluster -computername CLUSTERNAME -class mscluster_resource | where{$_.type -eq "File Share"}

Which would be a wmi query:

wmiquery = "Select * from MSCluster_Resource where Type='File Share'"


jvierra2008-07-31 11:49:25
User avatar
pc_doctor
Posts: 61
Last visit: Tue Jan 03, 2012 4:22 am

How to find all file shares on a cluster?

Post by pc_doctor »

Beautiful. Can you tell me how to find the path associated with each share? Like MYSHARE points to s:mydirmyshare?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

How to find all file shares on a cluster?

Post by jvierra »

Did you try MSCluster_ResourceToDisk ?

http://msdn.microsoft.com/en-us/library ... S.85).aspx
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

How to find all file shares on a cluster?

Post by jvierra »

Here is a good set of clues

uploads/2491/ClusWMI.zip

It's teh MOF for the classes for clustering. It will have all of teh properties and methods. for all classes. Use it to find items that you can google for help.

Much of this is new and undocumented or poorly documented. The Platform SDK has more docs available but few examples.

This topic is 15 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked