I am trying to create a script that would highlight missing features by comparing features I need installed with the installed features on a server, that I placed in my array variable in powershell. But I cannot figure out why the installed state is not displaying on my powershell?
This is the script:
$InstallState = "Install State"
Get-WindowsFeature | Select-Object "Name",$InstallState | Where-Object {$_.$InstallState -like "Available"}
I have also tried this
$InstallState = "Install State"
Get-WindowsFeature | Select-Object "Name",$InstallState
I get the Name, but the Install State is blank.
There is no space. You can see the members with the
Get-Member
commandSimply change it to