tags:

views:

27

answers:

2

I found a powershell tip regarding $profile.psextended that returns all of the various Powershell profiles and their locations. Having never see that before I ran ($profile | get-member). psextended was not in the list of results.

Having access to some very helpful MVPs on another site I asked how the psextended property was found. Within minutes I got a reply that using ($profile | gm -View all) should do the trick. I tried this and still had no results matching what I was looking for. If you enter $profile. and keep hitting the tab button it scrolls through the possible matches. psextended is nowhere to be found. Am I losing my mind or just plain blind?

Any help would be appreciated as I do not want to frustrate or annoy the guy trying to help me.

Thanks.

-- Eric

+2  A: 

Sorry. This was answered by Shay Levy (http://blogs.microsoft.co.il/blogs/ScriptFanatic/) on another service. Posted here to close the topic.

$profile | get-member -Force

lists the result I was looking for and several more for me to check out.

EricTravers
+2  A: 

Every object, once assigned to a variable, is wrapped in a special semi-transparent object called a PSObject. This is powershell's way of trying to level the playing field for the different types of things that be assigned to a variable. There are four "special" properties exposing different things for any given variable in powershell:

ps> $o = 1
ps> $o.psobject
...
ps> $o.psadapted
...
ps> $o.psextended
...
ps> $o.psbase
...

You can read about these properties over on: http://blogs.msdn.com/b/powershell/archive/2006/11/24/what-s-up-with-psbase-psextended-psadapted-and-psobject.aspx

x0n
Excellent! Thanks for the link.
EricTravers