< Back

Get-AstType

Fri Jan 10, 2020 9:12 pm

NAME Get-AstType



SYNOPSIS

Returns all of the types of AST objects in a script.





SYNTAX

Get-AstType [-ScriptPath] <String> [<CommonParameters>]





DESCRIPTION

Parses the contents of a provided script and gets a list of all the AST object types.





PARAMETERS

-ScriptPath <String>



Required? true

Position? 1

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.PSObject[]





NOTES





Author: Thomas Rayner (@MrThomasRayner), workingsysadmin.com



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



PS C:\\>Get-AstType -ScriptPath .\\MyScript.ps1















RELATED LINKS

http://workingsysadmin.com