< Back

Get-Ast

Wed Jan 15, 2020 1:56 am

NAME Get-Ast



SYNOPSIS

Get the abstract syntax tree for either a file or a scriptblock.





SYNTAX

Get-Ast [[-Path] <String>] [-Discard <Object>] [<CommonParameters>]



Get-Ast [-ScriptBlock <ScriptBlock>] [-Discard <Object>] [<CommonParameters>]





DESCRIPTION

Get the abstract syntax tree for either a file or a scriptblock.





PARAMETERS

-Path <String>

The path to a file containing one or more functions.



Required? false

Position? 2

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ScriptBlock <ScriptBlock>

A script block containing one or more functions.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Discard <Object>



Required? false

Position? named

Default value

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

System.Management.Automation.Language.ScriptBlockAst







RELATED LINKS