답변:
현재 답변은 로컬로 작성된 기능에 대해서만 작동합니다. 예를 들어와 같은 기본 함수의 정의를 볼 수 있습니다 Get-EventLog.
사용 가능한 모든 기능의 목록을 보려면 다음을 실행할 수 있습니다.
Get-ChildItem Function::
이들의 상관에 전달 될 수 ${function:myFn}또는(Get-Command myFn).Definition
네이티브 함수를 들여다보고 싶다면 다음 코드를 실행할 수 있습니다 .
$metadata = New-Object system.management.automation.commandmetadata (Get-Command Get-EventLog)
[System.management.automation.proxycommand]::Create($MetaData) | out-file C:\Get-EventLog.ps1
$profilefunction def ($funcname) { (Get-Command $funcname).Definition }