Author Posts

March 23, 2018 at 3:49 pm

So I want to a copy the value of a registry entry to another one. Should be easy enough.

$Value = Get-ItemPropertyValue HKLM\Software\PA\Globe\ -name IPaddress_333rrr
This is the same on every computer so straight fwd.

Set-ItemProperty HKLM\Software\PA\Globe\ -name -value $value

Name of the entry is Ipaddress_ random characters and numbers. It's different on every machine. How can extract that so I put it -name switch? Under this key two entries says ipaddress with random characters one is the same on every computer. the other two say ipaddressV6 with random characters.

The best I could come up with was get-item hklm\Software\PA\Globe\

$property = Get-ItemProperty 'hklm\Software\PA\Globe\'
$result = $property | Select-Object -Property ipaddress* -ExcludeProperty IpaddressIPv6*, IPAddress_fg5a2143b789235a4620e17bacdd2543

Which gives me the results

PS C:\windows\system32> $result

IPaddress_29aff336a99e5a839ee77ac0d0a4170
——————————————-
152.36.25.24

How can I get that reg entry without the value?

March 24, 2018 at 12:15 pm

Using some super secret hidden properties:

$name = $result.psobject.properties.name  

March 26, 2018 at 2:36 am

Thank you so much, worked like charm. I have to do some research about that super secret line psojects and commands like it.