< Back

Add-PromptTask

Sun Jan 19, 2020 5:36 pm

NAME Add-PromptTask



SYNOPSIS

Add a ScriptBlock or function to the list of PromptTasks.





SYNTAX

Add-PromptTask [-Name] <String> [-Function] <ScriptBlock> [<CommonParameters>]





DESCRIPTION

Function to add a ScriptBlock or function to the current list of PromptTasks.





PARAMETERS

-Name <String>

Name of the PromptTask being added.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Function <ScriptBlock>

Scriptblock or function to add as a PromptTask to run against all computers.



Required? true

Position? 2

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



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



PS C:\\>Add-PromptTask UpdateWindowTitle { $Host.UI.RawUI.WindowTitle = (pwd) }













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



PS C:\\>function foo{ $Host.UI.RawUI.WindowTitle = (pwd) }



Add-PromptTask UpdateWindowTitle $function:foo











RELATED LINKS

https://github.com/jimmehc/PromptEd





CommonParameters : False

WorkflowCommonParameters : False

details : @{name=BuiltInPromptCompletion; noun=; verb=}

Syntax : @{syntaxItem=System.Object[]}

parameters : @{parameter=System.Object[]}

inputTypes : @{inputType=}

returnValues : @{returnValue=}

aliases : None



remarks : None

alertSet :

description :

examples :

Synopsis :

BuiltInPromptCompletion [[-commandName] <Object>] [[-parameterName] <Object>]

[[-wordToComplete] <Object>] [[-commandAst] <Object>] [[-fakeBoundParameters] <Object>]



ModuleName : PromptEd

nonTerminatingErrors :

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

Name : BuiltInPromptCompletion

Category : Function

Component :

Role :

Functionality :