Help - Search - Members - Calendar
Full Version: How can I set the "description" field of a cluster resource
MSFN Forums > Coding, Scripting and Servers > Programming (C++, Delphi, VB, etc.)

   
Google Internet Forums Unattended CD/DVD Guide
kalcee
Hello All,

I have a WMI Script which gives the name and description of all the resources in a cluster server.

CODE
On Error Resume Next
strComputer = "ABCD"

      Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MSCluster")
      Set colItems = objWMIService.ExecQuery("SELECT * FROM MSCluster_Resource'")

      For Each objItem In colItems
             WScript.Echo "Description: " & objItem.Description
             WScript.Echo "Name: " & objItem.Name
            
      Next



And thus I have a list of resources with names and descriptions. Now my problem is that I have a new set of descriptions to be pushed back into the resource description field. How can I do that? If it was a normal shared folder in a local computer we can use the method 'SetShareInfo'. But I have no clue how to do this for a resource. Any help appreciated.

Thank You
ReDucTor
http://msdn.microsoft.com/en-us/library/aa371464(VS.85).aspx

QUOTE
Description
Data type: string
Access type: Read/write

Provides access to the resource's Description property.

Inherited from MSCluster_LogicalElement.


objItem.Description = "ahaha"
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.