Forum Discussion
Andrey_Kitsen
7 years agoFormer Employee
Good job @Brandon
@mkerfoot OCD for brackets, but doesn't use a code block....
I couldn't resist.
hostname=hostProps.get("system.hostname") my_query="Select NAME from Win32_serverfeature" def session = WMI.open(hostname); import com.santaba.agent.groovyapi.win32.WMI def result = session.queryAll("CIMv2", my_query, 15); def strResult = result.NAME.toString(); def finalOutput = strResult.replace("["," ").replace("]"," "); println "WindowsFeatures=" + finalOutput
Related Content
- 2 years agoAnonymous
- 7 months ago