< Back
Add-PodeHandler
Post
NAME Add-PodeHandler
SYNOPSIS
Adds a Handler of a specific Type.
SYNTAX
Add-PodeHandler -Type <String> -Name <String> -ScriptBlock <ScriptBlock> [-ArgumentList <Object[]>]
[<CommonParameters>]
Add-PodeHandler -Type <String> -Name <String> -FilePath <String> [-ArgumentList <Object[]>] [<CommonParameters>]
DESCRIPTION
Adds a Handler of a specific Type.
PARAMETERS
-Type <String>
The Type of the Handler.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
The Name of the Handler.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The ScriptBlock for the Handler's main logic.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-FilePath <String>
A literal, or relative, path to a file containing a ScriptBlock for the Handler's main logic.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ArgumentList <Object[]>
An array of arguments to supply to the Handler's ScriptBlock.
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
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Add-PodeHandler -Type Smtp -Name 'Main' -ScriptBlock { /* logic */ }
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Add-PodeHandler -Type Service -Name 'Looper' -ScriptBlock { /* logic */ }
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Add-PodeHandler -Type Smtp -Name 'Main' -ScriptBlock { /* logic */ } -ArgumentList 'arg1', 'arg2'
RELATED LINKS
SYNOPSIS
Adds a Handler of a specific Type.
SYNTAX
Add-PodeHandler -Type <String> -Name <String> -ScriptBlock <ScriptBlock> [-ArgumentList <Object[]>]
[<CommonParameters>]
Add-PodeHandler -Type <String> -Name <String> -FilePath <String> [-ArgumentList <Object[]>] [<CommonParameters>]
DESCRIPTION
Adds a Handler of a specific Type.
PARAMETERS
-Type <String>
The Type of the Handler.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
The Name of the Handler.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The ScriptBlock for the Handler's main logic.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-FilePath <String>
A literal, or relative, path to a file containing a ScriptBlock for the Handler's main logic.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ArgumentList <Object[]>
An array of arguments to supply to the Handler's ScriptBlock.
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
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Add-PodeHandler -Type Smtp -Name 'Main' -ScriptBlock { /* logic */ }
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Add-PodeHandler -Type Service -Name 'Looper' -ScriptBlock { /* logic */ }
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Add-PodeHandler -Type Smtp -Name 'Main' -ScriptBlock { /* logic */ } -ArgumentList 'arg1', 'arg2'
RELATED LINKS