Enable-KrConfiguration
SYNOPSIS
Enables Kestrun server configuration and starts the server.
SYNTAX
Enable-KrConfiguration [[-Server] <KestrunHost>] [[-ExcludeVariables] <String[]>] [-Quiet] [-PassThru]
[<CommonParameters>]
DESCRIPTION
This function applies the configuration to the Kestrun server and starts it.
EXAMPLES
EXAMPLE 1
Enable-KrConfiguration -Server $server
Applies the configuration to the specified Kestrun server instance and starts it.
PARAMETERS
-Server
The Kestrun server instance to configure and start. This parameter is mandatory.
Type: KestrunHost
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ExcludeVariables
An array of variable names to exclude from the runspaces.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Quiet
If specified, suppresses output messages during the configuration and startup process.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-PassThru
If specified, the cmdlet will return the modified server instance after applying the configuration.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
Kestrun.Hosting.KestrunHost
NOTES
This function is designed to be used after the server has been configured with routes, listeners, and other middleware components.