Problem:
Using bmsh to retrieve deployed archive's name from command prompt
- Product Name: BES, BAS
- Product Version: 6.5,6.6
- Product Component: bmsh
- Platform/OS Version: ALL
Resolution:
- Substitute "PleaseEnterYourServerName" with real hub name in the JavaScript below
- Copy and Paste the JavaScript as "displayModules.js"
- Start target Borland Management Agent (i.e. scu)
- Execute bmsh from command prompt where BES' environment variables are set by vbroker.sh (Unix) or vbroker.bat (Windows):
# bmsh -user admin -pswd admin -realm ServerRealm displayModules.js
This is runable from any machine on your network
--------------
/* for BES6.5 or later */
var serverName = "PleaseEnterYourServerName";
var mgmtPort = bes.getManagementPort(bes.managementDomain);
var hub = new Hub();
if (hub.connect(mgmtPort, serverName))
print("connected to " serverName " at " hub.getHost());
else {
print("unable to connect to " serverName);
quit();
}
var configurations = hub.getConfigurations();
var ext = new Array(2);
ext[0] = "war";
ext[1] = "ear";
for (conf in configurations) {
var configuration = hub.getConfiguration(configurations[conf]);
print("Configuration:" configuration.getName());
var mos = configuration.getManagedObjects();
for (managedObject in mos) {
if (mos[managedObject].getType() == "partition") {
print("\\tpartition - " mos[managedObject].getName());
var fileNames = mos[managedObject].getFileNames(ext, true);
for (f in fileNames)
print("\\t\\t" fileNames);
}
}
}
hub.disconnect();
quit();
--------------
Old KB# 15238
#Security
#bmsh
#VisiBroker
#BorlandApplicationServer




