< Back

Get-PSCallTrace

Sun Jan 19, 2020 6:19 pm

NAME Get-PSCallTrace



SYNOPSIS

Get-PSCallTrace Displays the output of all of the TraceData that has been accumulated.





SYNTAX

Get-PSCallTrace [[-Filter] <ScriptBlock>] [<CommonParameters>]





DESCRIPTION

Get-PSCallTrace -Filter { $_.FunctionName -eq "Write-Host" } | ft

See Examples for Additional Usage





PARAMETERS

-Filter <ScriptBlock>



Required? false

Position? 1

Default value { $true }

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>. {



New-PSCallTraceHook -FunctionName Write-Host -Module Microsoft.PowerShell.Utility

Write-Host "My String"

Get-PSCallTrace | ft

}









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-PSCallTrace -Filter { $_.FunctionName -eq "Write-Host" } | ft















RELATED LINKS