Define Win32_OptionalFeature Parent Function
History, in 2012-R2, with Powershell v4.0 you have access to a command drive Get-WindowsFeature
that only runs on the server OS. It includes a parent field, which is needed to populate the tree node, since the child nodes are anchored to the parent node.
Get-WindowsFeature | select Name,DisplayName,Installed,Parent
From Windows 7 / 8.1 we can't use the cmdlet, it doesn't run on the desktop OS. Here we can see the same data, but not the parent ID. How do I determine the parent function from WMI? Open any answer that solves the problem.
GWMI Win32_OptionalFeature | select Name,Caption,InstallState
http://msdn.microsoft.com/en-us/library/ee309383%28v=vs.85%29.aspx
In short, I am trying to generate a .csv dump from the gwmi command that will be used to populate the TreeView control based on the currently installed functionality. Something like this.
source to share
Not exactly what you are asking, but microsoft provides a remediation utility
to manage additional features. Look at the switch /get-features
and /get-featureinfo
.
Here is an example on how to install RSAT (Remote Server Administration Tools)
start-process "powershell" -verb "runas" -argumentlist "-noprofile -command
dism.exe /Online /Enable-Feature
/FeatureName:RemoteServerAdministrationTools
/FeatureName:RemoteServerAdministrationTools-Roles
/FeatureName:RemoteServerAdministrationTools-Roles-AD
/FeatureName:RemoteServerAdministrationTools-Roles-AD-Powershell"
source to share