About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Thursday, February 28, 2008

Finding all variables and functions in Powershell

To get the list of all the variables or functions that have been declared and pre-existing:

ls variable:*

ls function:*

Note: You can change the wildcard(*) if you are looking for something more specific.

ls can obviously be substituted with dir or get-childitem if you are more familiar with those key-words.

Something Interesting:

If you want to look more closely at what the function is actually doing then you just need to type: $function:<name of function> like so:

$function:mkdir

which will return:

param([string] $name) New-Item $name -type directory

2 comments:

Unknown said...

Thanks, this is a very useful tip

Anonymous said...

Thank you sir.