Connects to compute cluster head node and lists cluster properties.

Visual Basic
Edit|Remove
strClusterName = "localhost" 'Change to name of cluster if not run locally.
Set objComputeCluster = CreateObject("Microsoft.ComputeCluster.Cluster")
objComputeCluster.Connect(strClusterName)
WScript.Echo "Compute Cluster Name: " & objComputeCluster.Name
WScript.Echo "Compute Cluster Nodes:"
Set colNodes = objComputeCluster.ComputeNodes
For Each objNode In colNodes
  WScript.Echo "  " & objNode.Name
Next
WScript.Echo "Server calls asynchronous: " & objComputeCluster.IsAsynchronous
WScript.Echo "Compute Cluster Environment Variables:"
Set colEnvVars = objComputeCluster.EnvironmentVariables
For Each objEnvVar In colEnvVars
  WScript.Echo "  " & objEnvVar.Name & " = " & objEnvVar.Value
Next
WScript.Echo "Compute Cluster Parameters:"
Set colParams = objComputeCluster.Parameters
For Each objParam In colParams
  WScript.Echo "  " & objParam.Name & " = " & objParam.Value
Next