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.
 
 
 
 
 
 

36 lines
1.0 KiB

//***************************************************************************
//This script tests the ability to access remote CIMOMs with non-default
//credentials
//***************************************************************************
var Locator = new ActiveXObject("WbemScripting.SWbemLocator");
var Service = Locator.ConnectServer ("lamard3", "root\\sms\\site_la3", "smsadmin", "Elvis1");
Service.Security_.ImpersonationLevel = 3;
var Site = Service.Get ('SMS_Site.SiteCode="LA3"');
var cimomId = GetObject ('winmgmts:{impersonationLevel=impersonate}!\\\\ludlow\\root\\cimv2:Win32_LogicalDisk="C:"');
var e = new Enumerator (cimomId.Properties_);
for (;!e.atEnd();e.moveNext())
{
var Property = e.item ();
str = Property.Name + " = ";
value = Property.Value;
if (value == null) {
str = str + "<null>";
}
else
{
str = str + value;
}
WScript.Echo (str);
}
WScript.Echo (Site.Path_.DisplayName);
WScript.Echo (Site.BuildNumber);
WScript.Echo (Site.ServerName);
WScript.Echo (Site.InstallDir);