Register PodeEvent - mdaneri/Pode GitHub Wiki
Registers a script to be run when a certain server event occurs within Pode
Register-PodeEvent [-Type] <PodeServerEventType> [-Name] <String> [-ScriptBlock] <ScriptBlock>
[[-ArgumentList] <Object[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Registers a script to be run when a certain server event occurs within Pode, such as Start, Terminate, and Restart.
Register-PodeEvent -Type Start -Name 'Event1' -ScriptBlock { }
An array of arguments to supply to the ScriptBlock.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA unique Name for the registered event.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA ScriptBlock to invoke when the event is triggered.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThe Type of event to be registered.
Type: PodeServerEventType
Parameter Sets: (All)
Aliases:
Accepted values: Start, Starting, Terminate, Restarting, Restart, Browser, Crash, Stop, Running, Suspending, Suspend, Resuming, Resume, Enable, Disable
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.