Select particular objects under one property

Welcome Forums General PowerShell Q&A Select particular objects under one property

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
6 months, 3 weeks ago.

  • Author
    Posts
  • #113018

    Participant
    Topics: 2
    Replies: 6
    Points: 0
    Rank: Member

    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.

     

  • #113075

    Keymaster
    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

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

    • #113078

      Participant
      Topics: 2
      Replies: 6
      Points: 0
      Rank: Member

      Thank you Don, that worked 🙂

The topic ‘Select particular objects under one property’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort