UCMDB and UD Practitioners Forum (Previously CMS)

uCMDB WMI Client

Bala KS
Frequent Contributor.

uCMDB WMI Client

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

Super Contributor.

Re: uCMDB WMI Client

Bala KS
Frequent Contributor.

Re: uCMDB WMI Client


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.

Karan C
HPE Expert

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.