Simple method for adding selected Windows Registry Keys or WMI classes to Grains
A simple method for adding custom Windows Registry Keys to Grains so they can be used for targeting, reporting etc. Microsoft stores an incredible amount of configuration data directly in the registry.
Perhaps a section in the Minion conf that would allow you to specify list of named Registry Keys and the corresponding value name. Example for RDP Port:
RDP-PORT HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp PortNumber
The ability to query a WMI class in order to populate grains would provide comprehensive targeting support for Microsoft systems. Example, if I want to know which Microsoft "Server Roles" are installed such as "web server", "DNS Server", "SMTP Server" etc this is best retrieved remotely via WMI (see http://msdn.microsoft.com/en-us/library/cc280268(VS.85).aspx)
Example might look something like:
SERVER-ROLES "Select Name from ROOT\CIMV2\Win32_ServerFeature"
Yes, harnessing the data in the registry will be very useful.
BTW, Win32_ServerFeature is deprecated, and slated to be replaced by: MSFT_ServerManagerDeploymentTasks for Windows 8/2012 Server. Thanks, Microsoft!
Windows Powershell has cmd-lets for handling these, also, which is probably safer for now.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.