The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
UCMDB and UD Practitioners Forum (Previously CMS)
cancel
Showing results for 
Search instead for 
Did you mean: 

uCMDB WMI Client

Highlighted
Bala KS
Occasional Advisor

uCMDB WMI Client

Hi,
How to execute cmd command on the client machine through WMI protocol.When I'm trying to execute command it's throwing Attribute Error.we need to get some configuration file list from client machine.
If anybody knows kindly suggest me...

 

P.S. This thread has been moved from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. -HP Forum Moderator

3 REPLIES
JanH
Regular Collector

Re: uCMDB WMI Client

Bala KS
Occasional Advisor

Re: uCMDB WMI Client

Jan,

Thanks for your information...

Actually I'm trying to execute the command through jython script(Discovery).I can get client object but I couldn't execute the command using client.executeCmd(command), its throwing attribute error.

Do you have any sample script for the above.

Thanks,
Bala
Karan C
New Member

Re: uCMDB WMI Client

If you're using WMI you will have to execute a query.

E.g. resultSet = client.executeQuery("SELECT Name,FileSystem,Size,DriveType FROM Win32_LogicalDisk WHERE DriveType=3")

If you want to run a shell command on a remote Windows server you'll have to use the NTCMD protocol.

I suggest you look at the script (file_mon_utils.py) and the function (getFilesWindows) to see how this is done.

--KC
//Add this to "OnDomLoad" event