Forum Discussion
Andrey_Kitsen
8 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
- 14 days ago
- 2 years agoAnonymous