Select particular objects under one property

Hello everyone,

I am using the below cmdlet.

Get-RemoteAccessHealth | Select-Object component, Healthstate

I get the output like below:

component healthstate


Cluster OK

Server OK

6to4 OK

Network Security OK

Dns OK

IP-Https OK

Nat64 OK

Dns64 OK

IPsec OK

Kerberos OK

Domain Controller OK

Management Servers OK

Network Location Server OK

Teredo OK

Network Adapters OK

Services OK

Server OK

6to4 OK

Network Security OK

Dns OK

IP-Https OK

Nat64 OK

Dns64 OK

IPsec OK

Kerberos OK

Domain Controller OK

Management Servers OK

Network Location Server OK

Teredo OK

Network Adapters OK

My question is, I don’t need all the objects under component, I need selected components and there health state. Can some one help me with this. Thank you.

 

| where { $_.Component -in @(‘Network Location Server’,‘Teredo’) }

Thank you Don, that worked :slight_smile: