Skip navigation
Find the code for a function in PowerShell

Find the code for a function in PowerShell

Q. How can I get the content of a function in PowerShell?

A. If you want to view the code for a function you can view its content through the Function PSDrive. For example:

get-content function:\mkdir

Note this example of mkdir shows how PowerShell emulates the cmd.exe mkdir which is really just New-Item with a type of Directory.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish