Remove-KrTask
SYNOPSIS
Removes a finished task from the registry.
SYNTAX
__AllParameterSets
Remove-KrTask [[-Server] <KestrunHost>] [-Id] <string> [-WhatIf] [-Confirm] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION
Deletes a task after it has completed/faulted/cancelled; does not cancel.
EXAMPLES
EXAMPLE 1
Remove-KrTask -Id ‘task-id’ Removes the specified task.
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Id
Task id to remove.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Server
The Kestrun server instance.
Type: Kestrun.Hosting.KestrunHost
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Kestrun.Hosting.KestrunHost
{{ Fill in the Description }}
OUTPUTS
System.Boolean
{{ Fill in the Description }}
NOTES
Requires the Kestrun Task service to be added to the server via Add-KrTasksService. A task can only be removed if it is in a final state (Completed, Failed, Stopped). Returns $true if the task was found and removed; $false if the task was not found or could not be removed. This cmdlet supports ShouldProcess for confirmation prompts.
RELATED LINKS
{{ Fill in the related links here }}