PropertySource - Installed Windows Server Features
Useful for inventory, auditing, and auto-grouping.
Displays the a list of all installed Windows Features separated by commas.
Example below.
| auto.winfeatures | [Active Directory Lightweight Directory Services, .NET Framework 3.5.1 Features, Telnet Client, Remote Server Administration Tools, .NET Framework 3.5.1, Role Administration Tools, AD LDS Snap-Ins and Command-Line Tools, AD DS and AD LDS Tools, Active Directory module for Windows PowerShell] |
WMN9DN
Brandon Woods
Posted 9 years ago·Last reply 8 years ago
9 comments
Medi_Esmail
·8 years agoAwesome job Guy's, loved it, but i wanted to show pretty much all the stuff so i updated it limiting the exclude to only Netlogon,
EMRLT9
Screen Shot
Love it.
Medi
Brandon Woods
OP8 years agoWell, I had a few use cases come up for this, so I decided to take another crack at it. I think this is going to work out better for us than my first version:
Someone try this one and let me know if I missed anything obvious. I tried to cut out all the noise so it would only spit out the services anyone really cares about.
Brandon Woods
OP8 years agoThanks @mkerfoot and @Andrey Kitsen. I'll have more good stuff to share soon. I always appreciate feedback!
Andrey_Kitsen
·8 years agoJust keep up that good work.
mkerfoot
·8 years agoHaha oh man! Thanks @Andrey Kitsen !
Andrey_Kitsen
·8 years agoGood job @Brandon
@mkerfoot OCD for brackets, but doesn't use a code block....
I couldn't resist.
mkerfoot
·8 years agoBrandon,
I have modified the code slightly to get rid of the annoying open and close brackets(my OCD kicked in hard).
groovy script:
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
P.S. - this script is awesome!
dehatej
·8 years agoWhere's the syntax for this?
dehatej
·8 years ago