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.

47 lines
1.1 KiB

  1. <job id="Cluster NetInterfaces">
  2. <reference guid="{f2e606e0-2631-11d1-89f1-00a0c90d061e}" version="1.0" />
  3. <script language="JScript">
  4. RunNetInterfacesTests();
  5. WScript.Echo( "Result:" + ForInTest());
  6. function RunNetInterfacesTests()
  7. {
  8. var count;
  9. var oNetInterface;
  10. var oNetInterfaces;
  11. var oCluster;
  12. oCluster = WScript.CreateObject("MSCluster.Cluster");
  13. oCluster.Open( ("GALENB-CLUS"));
  14. collNetInterfaces = oCluster.NetInterfaces;
  15. count = collNetInterfaces.count;
  16. WScript.Echo( "Count: " + count );
  17. for ( oNetInterface in collNetInterfaces ) { //loop every item in collection
  18. WScript.Echo( "NetInterface: " + oNetInterface.Name );
  19. } //for every item in collection
  20. }
  21. function ForInTest()
  22. {
  23. // Create some variables.
  24. var a, key, s = "";
  25. // Initialize object.
  26. a = {"a" : "Athens" , "b" : "Belgrade", "c" : "Cairo"}
  27. // Iterate the properties.
  28. for (key in a)
  29. {
  30. s += a[key] + "<BR>";
  31. WScript.Echo( "String: " + s );
  32. }
  33. return(s);
  34. }
  35. </script>
  36. </job>