Skip to content

Add-PodeEndpoint

SYNOPSIS

Bind an endpoint to listen for incoming Requests.

SYNTAX

Default (Default)

Add-PodeEndpoint [-Address <String>] [-Port <Int32>] [-Hostname <String>] [-Protocol <String>]
 [-X509Certificate <X509Certificate>] [-Name <String>] [-RedirectTo <String>] [-Description <String>] [-Force]
 [-AllowClientCertificate] [-PassThru] [-LookupHostname] [-Default] [<CommonParameters>]

CertFile

Add-PodeEndpoint [-Address <String>] [-Port <Int32>] [-Hostname <String>] [-Protocol <String>]
 -Certificate <String> [-CertificatePassword <String>] [-CertificateKey <String>]
 [-X509Certificate <X509Certificate>] [-Name <String>] [-RedirectTo <String>] [-Description <String>] [-Force]
 [-AllowClientCertificate] [-PassThru] [-LookupHostname] [-Default] [<CommonParameters>]

CertThumb

Add-PodeEndpoint [-Address <String>] [-Port <Int32>] [-Hostname <String>] [-Protocol <String>]
 -CertificateThumbprint <String> [-CertificateStoreName <StoreName>]
 [-CertificateStoreLocation <StoreLocation>] [-X509Certificate <X509Certificate>] [-Name <String>]
 [-RedirectTo <String>] [-Description <String>] [-Force] [-AllowClientCertificate] [-PassThru]
 [-LookupHostname] [-Default] [<CommonParameters>]

CertName

Add-PodeEndpoint [-Address <String>] [-Port <Int32>] [-Hostname <String>] [-Protocol <String>]
 -CertificateName <String> [-CertificateStoreName <StoreName>] [-CertificateStoreLocation <StoreLocation>]
 [-X509Certificate <X509Certificate>] [-Name <String>] [-RedirectTo <String>] [-Description <String>] [-Force]
 [-AllowClientCertificate] [-PassThru] [-LookupHostname] [-Default] [<CommonParameters>]

CertRaw

Add-PodeEndpoint [-Address <String>] [-Port <Int32>] [-Hostname <String>] [-Protocol <String>]
 -X509Certificate <X509Certificate> [-Name <String>] [-RedirectTo <String>] [-Description <String>] [-Force]
 [-AllowClientCertificate] [-PassThru] [-LookupHostname] [-Default] [<CommonParameters>]

CertSelf

Add-PodeEndpoint [-Address <String>] [-Port <Int32>] [-Hostname <String>] [-Protocol <String>]
 [-X509Certificate <X509Certificate>] [-Name <String>] [-RedirectTo <String>] [-Description <String>] [-Force]
 [-SelfSigned] [-AllowClientCertificate] [-PassThru] [-LookupHostname] [-Default] [<CommonParameters>]

DESCRIPTION

Bind an endpoint to listen for incoming Requests. The endpoints can be HTTP, HTTPS, TCP or SMTP, with the option to bind certificates.

EXAMPLES

EXAMPLE 1

Add-PodeEndpoint -Address localhost -Port 8090 -Protocol Http

EXAMPLE 2

Add-PodeEndpoint -Address localhost -Protocol Smtp

EXAMPLE 3

Add-PodeEndpoint -Address dev.pode.com -Port 8443 -Protocol Https -SelfSigned

EXAMPLE 4

Add-PodeEndpoint -Address 127.0.0.2 -Hostname dev.pode.com -Port 8443 -Protocol Https -SelfSigned

EXAMPLE 5

Add-PodeEndpoint -Address live.pode.com -Protocol Https -CertificateThumbprint '2A9467F7D3940243D6C07DE61E7FCCE292'

PARAMETERS

-Address

The IP/Hostname of the endpoint (Default: localhost).

Type: String
Parameter Sets: (All)
Aliases:

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

-AllowClientCertificate

Allow for client certificates to be sent on requests.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Certificate

The path to a certificate that can be use to enable HTTPS

Type: String
Parameter Sets: CertFile
Aliases:

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

-CertificateKey

A key file to be paired with a PEM certificate file referenced in Certificate

Type: String
Parameter Sets: CertFile
Aliases:

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

-CertificateName

A certificate subject name to bind onto HTTPS endpoints (Windows).

Type: String
Parameter Sets: CertName
Aliases:

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

-CertificatePassword

The password for the certificate file referenced in Certificate

Type: String
Parameter Sets: CertFile
Aliases:

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

-CertificateStoreLocation

The location of a certifcate store where a certificate can be found (Default: CurrentUser) (Windows).

Type: StoreLocation
Parameter Sets: CertThumb, CertName
Aliases:
Accepted values: CurrentUser, LocalMachine

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

-CertificateStoreName

The name of a certifcate store where a certificate can be found (Default: My) (Windows).

Type: StoreName
Parameter Sets: CertThumb, CertName
Aliases:
Accepted values: AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher

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

-CertificateThumbprint

A certificate thumbprint to bind onto HTTPS endpoints (Windows).

Type: String
Parameter Sets: CertThumb
Aliases:

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

-Default

If supplied, this endpoint will be the default one used for internally generating URLs.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Description

A quick description of the Endpoint - normally used in OpenAPI.

Type: String
Parameter Sets: (All)
Aliases:

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

-Force

Ignore Adminstrator checks for non-localhost endpoints.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Hostname

An optional hostname for the endpoint, specifying a hostname restricts access to just the hostname.

Type: String
Parameter Sets: (All)
Aliases:

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

-LookupHostname

If supplied, a supplied Hostname will have its IP Address looked up from host file or DNS.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Name

An optional name for the endpoint, that can be used with other functions (Default: GUID).

Type: String
Parameter Sets: (All)
Aliases:

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

-PassThru

If supplied, the endpoint created will be returned.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Port

The Port number of the endpoint.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Protocol

The protocol of the supplied endpoint.

Type: String
Parameter Sets: (All)
Aliases:

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

-RedirectTo

The Name of another Endpoint to automatically generate a redirect route for all traffic.

Type: String
Parameter Sets: (All)
Aliases:

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

-SelfSigned

Create and bind a self-signed certifcate for HTTPS endpoints.

Type: SwitchParameter
Parameter Sets: CertSelf
Aliases:

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

-X509Certificate

The raw X509 certificate that can be use to enable HTTPS

Type: X509Certificate
Parameter Sets: Default, CertFile, CertThumb, CertName, CertSelf
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: X509Certificate
Parameter Sets: CertRaw
Aliases:

Required: True
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

NOTES