Get-ChildItem Registry subKey

Welcome Forums General PowerShell Q&A Get-ChildItem Registry subKey

Viewing 3 reply threads
  • Author
    Posts
    • #211644
      Participant
      Topics: 10
      Replies: 11
      Points: 61
      Rank: Member

      Trying to list only the Subkey Name using the command

      (Get-ChildItem “Registry::HKEY_Current_User\Software\WebEx\Plugins\Logon”).Name

      The output am getting is

      HKEY_CURRENT_USER\Software\WebEx\Plugins\Logon\aaaaaaa.webex.com_aaaaaa
      HKEY_CURRENT_USER\Software\WebEx\Plugins\Logon\bbbbbbbb.webex.com_bbbbbb_bbbbb@xyz.com
      HKEY_CURRENT_USER\Software\WebEx\Plugins\Logon\cccccccc.webex.com_ccccccc

      I just need only to list Names

      aaaaaaa.webex.com_aaaaaa

      bbbbbbbb.webex.com_bbbbbb_bbbbb@xyz.com

      bbbbbbbb.webex.com_bbbbbb_bbbbb@xyz.com

      I can do using Split command, but do not think it is a right way of achieving the result. Any help is much appreciated

    • #211656
      Participant
      Topics: 10
      Replies: 11
      Points: 61
      Rank: Member

      I was able to get the value

      $RegVal = Get-ChildItem “Registry::HKEY_Current_User\Software\WebEx\Plugins\Logon” | Get-ItemProperty | Select PsChildName -ExpandProperty PsChildName
      $RegVal

       

    • #211731
      Participant
      Topics: 5
      Replies: 322
      Points: 442
      Helping Hand
      Rank: Contributor
      Get-ChildItem HKCU:\Software\WebEx\Plugins\Logon | Select-Object PSChildName
      
    • #211770
      Participant
      Topics: 1
      Replies: 22
      Points: 67
      Helping Hand
      Rank: Member

      How about:

      (Get-Item “Registry::HKEY_Current_User\Software\WebEx\Plugins\Logon”).GetSubKeyNames()

Viewing 3 reply threads
  • You must be logged in to reply to this topic.