How to find all file shares on a cluster?
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.
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.
How to find all file shares on a cluster?
How would you format a WMI Query that returns all the file share resources on a Microsoft cluster server?
How to find all file shares on a cluster?
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
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
How to find all file shares on a cluster?
Beautiful. Can you tell me how to find the path associated with each share? Like MYSHARE points to s:mydirmyshare?
How to find all file shares on a cluster?
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.
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.