Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.3 KiB

  1. <HTML>
  2. <HEAD>
  3. <style>
  4. <!-- body { font-family: Verdana, Arial; font-size: 75%; }
  5. p.cluster { margin-top: 1em; margin-bottom: 0em; margin-left: 0em; }
  6. p.resource { margin-top: 1em; margin-bottom: 0em; margin-left: 5em; }
  7. p.property { margin-top: 0em; margin-bottom: 0em; margin-left: 10em; } -->
  8. </style>
  9. <TITLE> New Group</TITLE>
  10. <SCRIPT LANGUAGE="VBSCRIPT">
  11. <!--
  12. Option Explicit
  13. 'On Error Resume Next
  14. dim oCluster
  15. dim oGroup
  16. dim oRes
  17. dim sCluster
  18. dim oPrefNodes
  19. dim bModified
  20. dim nCount
  21. dim oNodes
  22. dim oNode
  23. Set oCluster = CreateObject("MSCluster.Cluster")
  24. sCluster = InputBox( "Cluster to open?" )
  25. oCluster.Open( sCluster )
  26. Document.Write "<B><p class=cluster>Cluster name is " & oCluster.Name & "</B><BR>"
  27. set oGroup = oCluster.ResourceGroups.Item("Test3")
  28. set oRes = oGroup.Resources.CreateItem( "TestRes", "8TestRes", 0 )
  29. oRes.Online( 10 )
  30. oRes.Offline( 10 )
  31. set oPrefNodes = oGroup.PreferredOwnerNodes
  32. set oNodes = oCluster.Nodes
  33. for each oNode in oNodes
  34. oPrefNodes.AddItem( oNode )
  35. next
  36. bModified = oPrefNodes.Modified
  37. oPrefNodes.SaveChanges
  38. bModified = oPrefNodes.Modified
  39. oPrefNodes.Refresh
  40. nCount = oPrefNodes.Count
  41. oRes.Delete
  42. -->
  43. </SCRIPT>
  44. </HEAD>
  45. <BODY>
  46. </BODY>
  47. </HTML>