Powershell get value of property

when i gci a reg directory this is what i get which is good.
full path
"HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\profilelist\"

0   8 S-1-5-21-3652174762-1322114... {ProfileImagePath, Flags, State, Sid...}  

but i need to get the value for the profileimagepath property.

dir | select-object -Property name
Displays all the SIDS

dir | select-object -Property ProfileImagePath
Has blank values in PS.

What am i not doing right?

Kylo RenSystem EngineerAsked:
Who is Participating?
flaphead_comConnect With a Mentor Commented:
try this
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"| ForEach-Object {$PIP=Get-ItemProperty $_.pspath;$PIP.PSChildName;$PIP.ProfileImagePath}

Open in new window

Kylo RenSystem EngineerAuthor Commented:
nice! that worked, thanks.

you lost me at this part


Can you tell me what, where or how you found .pspath .pschildname options?

This question might be easier to answer, how did you know use the ; symbol and what is its purpose?

Kylo RenSystem EngineerAuthor Commented:
Detailed information explaining my question can be found at the link below.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.