< Back

New-Stage

Sat Jan 18, 2020 7:42 pm

NAME New-Stage



SYNOPSIS

Creates a new stage.





SYNTAX

New-Stage [-Name] <String> [-Action] <ScriptBlock> [<CommonParameters>]





DESCRIPTION

Creates a new stage from the specified parameters. This cmdlet is used when defining

scripts to invoke.





PARAMETERS

-Name <String>

The name of the stage.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Action <ScriptBlock>

The scriptblock to execute when the stage is running.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

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-Stage "Title" { Write-Host "Running from stage!" }



Create a new stage with the name "Title" that writes a message to the interactive

console when run.











RELATED LINKS