windows-nt/Source/XPSP1/NT/base/cluster/admin/msclus/wsf/netinterfaces.wsf
2020-09-26 16:20:57 +08:00

48 lines
1 KiB
XML

<job id="Cluster NetInterfaces">
<reference guid="{f2e606e0-2631-11d1-89f1-00a0c90d061e}" version="1.0" />
<script language="JScript">
RunNetInterfacesTests();
WScript.Echo( "Result:" + ForInTest());
function RunNetInterfacesTests()
{
var count;
var oNetInterface;
var oNetInterfaces;
var oCluster;
oCluster = WScript.CreateObject("MSCluster.Cluster");
oCluster.Open( ("GALENB-CLUS"));
collNetInterfaces = oCluster.NetInterfaces;
count = collNetInterfaces.count;
WScript.Echo( "Count: " + count );
for ( oNetInterface in collNetInterfaces ) { //loop every item in collection
WScript.Echo( "NetInterface: " + oNetInterface.Name );
} //for every item in collection
}
function ForInTest()
{
// Create some variables.
var a, key, s = "";
// Initialize object.
a = {"a" : "Athens" , "b" : "Belgrade", "c" : "Cairo"}
// Iterate the properties.
for (key in a)
{
s += a[key] + "<BR>";
WScript.Echo( "String: " + s );
}
return(s);
}
</script>
</job>