Test-Path registry keys with overlapping names

Welcome Forums General PowerShell Q&A Test-Path registry keys with overlapping names

Viewing 7 reply threads
  • Author
    Posts
    • #208509
      Participant
      Topics: 1
      Replies: 1
      Points: 16
      Rank: Member

      Hi there,

      I have a strange issue, test-path for a registry key “Name AAA 123” works and it also works for the registry key “Name AAA 123/123”, but only if the first one is not present. If both are present, the key “Name AAA 123/123” cannot be found. The same with Get-Property(Item).

      Any idea?

      Thanks

      Zoran

      • This topic was modified 2 months, 4 weeks ago by Zoran10.
    • #208524
      Participant
      Topics: 4
      Replies: 2249
      Points: 5,494
      Helping Hand
      Rank: Community MVP

      Hmmm … please be honest: would you be able to understand your question if you had only what you wrote here? 😉

      Please show the complete paths you’re talking about and please show the code you’re using. You should format both as code using the code tag “PRE“. Thanks.

    • #209187
      Participant
      Topics: 1
      Replies: 1
      Points: 16
      Rank: Member

      Here it is. There is no code, I simply used Test-Path, Get-ItemProperty and Get-ItemPropertyValue. If “Triple DES 168” key is present, PowerShell cannot read “Triple DES 168/168” key.

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\Triple DES 168

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\Triple DES 168/168

      Thanks

      Zoran

    • #209196
      Participant
      Topics: 4
      Replies: 2249
      Points: 5,494
      Helping Hand
      Rank: Community MVP

      And Test-Path, Get-ItemProperty and Get-ItemPropertyValue is not code? What is it, what you actually want to achieve?

      Get-ChildItem -Path REGISTRY::'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers' | 
          ForEach-Object {$_.Name}
    • #209337
      Participant
      Topics: 6
      Replies: 93
      Points: 428
      Helping Hand
      Rank: Contributor

      Olaf, your cracking me up …

       

    • #209376
      Participant
      Topics: 4
      Replies: 2249
      Points: 5,494
      Helping Hand
      Rank: Community MVP

      Olaf, your cracking me up …

      I’m sorry. Did I say something wrong? English is not my native language. So I’m sorry if I have made a mistake.

    • #209538
      Participant
      Topics: 6
      Replies: 93
      Points: 428
      Helping Hand
      Rank: Contributor

      No mistake at all, I just find your comments to be enlightening. No offense intended at all.

    • #209556
      Participant
      Topics: 4
      Replies: 2249
      Points: 5,494
      Helping Hand
      Rank: Community MVP

      Ah … ok … then … Thanks. 😉

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