< Back

Add-AzureEndpoint

Wed Jan 30, 2019 5:42 pm

NAME Add-AzureEndpoint



SYNOPSIS

Adds an endpoint to a virtual machine.





SYNTAX

Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> [-PublicPort <Nullable`1[Int32]>] [-DirectServerReturn

<Nullable`1[Boolean]>] [-ACL <NetworkAclObject>] [-InternalLoadBalancerName <String>] [-IdleTimeoutInMinutes <Nullable`1[Int32]>]

[-LoadBalancerDistribution <String>] [-VirtualIPName <String>] -VM <IPersistentVM> [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] -LBSetName <String> -NoProbe [<CommonParameters>]



Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> [-PublicPort <Nullable`1[Int32]>] [-DirectServerReturn

<Nullable`1[Boolean]>] [-ACL <NetworkAclObject>] [-InternalLoadBalancerName <String>] [-IdleTimeoutInMinutes <Nullable`1[Int32]>]

[-LoadBalancerDistribution <String>] [-VirtualIPName <String>] -VM <IPersistentVM> [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] -LBSetName <String> -DefaultProbe [<CommonParameters>]



Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> [-PublicPort <Nullable`1[Int32]>] [-DirectServerReturn

<Nullable`1[Boolean]>] [-ACL <NetworkAclObject>] [-InternalLoadBalancerName <String>] [-IdleTimeoutInMinutes <Nullable`1[Int32]>]

[-LoadBalancerDistribution <String>] [-VirtualIPName <String>] -VM <IPersistentVM> [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]

[-InformationVariable <String>] -LBSetName <String> -ProbePort <Int32> -ProbeProtocol <String> [-ProbePath <String>] [-ProbeIntervalInSeconds

<Nullable`1[Int32]>] [-ProbeTimeoutInSeconds <Nullable`1[Int32]>] [<CommonParameters>]





DESCRIPTION

The Add-AzureEndpoint cmdlet adds an endpoint to an Azure virtual machine object.





PARAMETERS

-Name <String>

Specifies a name for the endpoint.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Protocol <String>

Specifies the protocol of the endpoint. Valid values are:



-- tcp



-- udp



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LocalPort <Int32>

Specifies the local, private, port that this endpoint uses. Applications within the virtual machine listen on this port for service input requests

for this endpoint.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PublicPort <Nullable`1[Int32]>

Specifies the public port that the endpoint uses. If you do not specify a value, Azure assigns an available port.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DirectServerReturn <Nullable`1[Boolean]>

Specifies whether this cmdlet enables direct server return. Specify $True to enable, or $False to disable.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ACL <NetworkAclObject>

Specifies an access control list (ACL) configuration object for the endpoint.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InternalLoadBalancerName <String>

Specifies the name of the internal load balancer.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IdleTimeoutInMinutes <Nullable`1[Int32]>

Specifies the TCP idle time-out period, in minutes, for the endpoint.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LoadBalancerDistribution <String>

Specifies the load balancer distribution algorithm. Valid values are:



-- sourceIP. A two tuple affinity: Source IP, Destination IP



-- sourceIPProtocol. A three tuple affinity: Source IP, Destination IP, Protocol



-- none. A five tuple affinity: Source IP, Source Port, Destination IP, Destination Port, Protocol





The default value is none.





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VirtualIPName <String>

Specifies the name of a virtual IP address that Azure associates to the endpoint. Your service can have multiple virtual IPs. To create virtual IPs,

use the Add-AzureVirtualIP cmdlet.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VM <IPersistentVM>

Specifies the virtual machine to which the endpoint belongs.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LBSetName <String>

Specifies the name of the load balancer set for the endpoint.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NoProbe [<SwitchParameter>]

Indicates that this cmdlet uses the no probe setting.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProbe [<SwitchParameter>]

Indicates that this cmdlet uses the default probe setting.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ProbePort <Int32>

Specifies the port that the endpoint uses.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProbeProtocol <String>

Specifies the port protocol. Valid values are:



-- tcp



-- http



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProbePath <String>

Specifies the relative path to the HTTP probe.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProbeIntervalInSeconds <Nullable`1[Int32]>

Specifies the probe polling interval, in seconds, for the endpoint.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProbeTimeoutInSeconds <Nullable`1[Int32]>

Specifies the probe polling time-out period in seconds.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Object







NOTES









-------------------------- Example 1: Add an endpoint --------------------------



PS C:\\>Get-AzureVM -ServiceName "ContosoService" -Name "VirutalMachine01" | Add-AzureEndpoint -Name "HttpIn" -Protocol "tcp" -PublicPort 80 -LocalPort

8080 | Update-AzureVM



This command retrieves the configuration of a virtual machine named VirtualMachine01 by using the Get-AzureVM cmdlet. The command passes it to the

current cmdlet by using the pipeline operator. This cmdlet adds an endpoint named HttpIn. The endpoint has a public port 80 and local port 8080. The

command passes the virtual machine object to the Update-AzureVM cmdlet, which implements your changes.

-------------------------- Example 2: Add an endpoint that belongs to a load balanced group --------------------------



PS C:\\>Get-AzureVM -ServiceName "LoadBalancedService" -Name "VirtualMachine12" | Add-AzureEndpoint -Name "HttpIn" -Protocol "tcp" -PublicPort 80

-LocalPort 8080 -LBSetName "WebFarm" -ProbePort 80 -ProbeProtocol "http" -ProbePath '/' | Update-AzureVM



This command retrieves the configuration of a virtual machine named VirtualMachine07. The current cmdlet adds an endpoint named HttpIn. The endpoint has

a public port 80 and local port 8080. The endpoint belongs to the shared load balanced group named WebFarm. An HTTP probe on port 80 with a path of '/'

monitors the availability of the endpoint. The command implements your changes.

-------------------------- Example 3: Associate a virtual IP to an endpoint --------------------------



PS C:\\>Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine25" | Add-AzureEndpoint -Name "HttpIn" -Protocol "tcp" -LocalPort 8080 -PublicPort

80 -VirtualIPName "ContosoVip11" | Update-AzureVM



This command retrieves the configuration of a virtual machine named VirtualMachine25. The current cmdlet adds an endpoint named HttpIn. The endpoint has

a public port 80 and local port 8080. This command associates a virtual IP to the endpoint. The command implements your changes.



RELATED LINKS

Add-AzureVirtualIP

Get-AzureEndpoint

Get-AzureVM

Remove-AzureEndpoint

Set-AzureEndpoint

Update-AzureVM