Skip to content

Add-PodeFavicon

SYNOPSIS

Adds a favicon to one or more Pode HTTP/HTTPS endpoints.

SYNTAX

Default (Default)

Add-PodeFavicon [-Default] [-EndpointName <String>] [-DefaultEndpoint] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

Path

Add-PodeFavicon -Path <String> [-EndpointName <String>] [-DefaultEndpoint] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

Binary

Add-PodeFavicon -Binary <Byte[]> [-EndpointName <String>] [-DefaultEndpoint]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This function allows you to define a favicon for Pode endpoints. You can either use the default favicon provided by Pode, specify a file path to a `.ico` file, or directly supply the favicon as a byte array. The function can apply the favicon to all HTTP/S endpoints, a specific endpoint, or only to endpoints marked as default.

EXAMPLES

EXAMPLE 1

Add-PodeFavicon -Default

Adds the default Pode favicon to all HTTP/S endpoints.

EXAMPLE 2

Add-PodeFavicon -Path './assets/favicon.ico'

Adds a custom favicon from file to all HTTP/S endpoints.

EXAMPLE 3

Add-PodeFavicon -Binary $bytes -EndpointName 'api'

Adds a binary favicon to a specific endpoint named 'api'.

EXAMPLE 4

Add-PodeFavicon -Default -DefaultEndpoint

Adds the default favicon only to endpoints marked as default.

PARAMETERS

-Binary

A raw byte array representing the favicon file contents.

Type: Byte[]
Parameter Sets: Binary
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default

Use the default Pode favicon embedded in the module.

Type: SwitchParameter
Parameter Sets: Default
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultEndpoint

If supplied, only endpoints created with `-Default` will receive the favicon.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName

The name of the specific endpoint to apply the favicon to. If not provided, the favicon is applied to all HTTP/S endpoints.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

The path to a custom favicon file to use. Must be a valid, accessible path.

Type: String
Parameter Sets: Path
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
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

None

NOTES