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?

LVL 5
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

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

you lost me at this part

$_.pspath;$PIP.PSChildName;$PIP.ProfileImagePath}

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?

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

http://powershell.com/cs/blogs/ebook/archive/2009/03/30/chapter-16-the-registry.aspx
0
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.