Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzPrivateEndpoint
- Module:
- Az.Network Module
Creates a private endpoint.
Syntax
Default (Default)
New-AzPrivateEndpoint
-Name <String>
-ResourceGroupName <String>
-Location <String>
-Subnet <PSSubnet>
-PrivateLinkServiceConnection <PSPrivateLinkServiceConnection[]>
[-ByManualRequest]
[-EdgeZone <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-ApplicationSecurityGroup <PSApplicationSecurityGroup[]>]
[-IpConfiguration <PSPrivateEndpointIPConfiguration[]>]
[-CustomNetworkInterfaceName <String>]
[-IpVersionType <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzPrivateEndpoint cmdlet creates a private endpoint.
Examples
Example 1: Create a private endpoint
The following example creates a private endpoint with a specific private link service ID in the specified subnet in a virtual network.
$virtualNetwork = Get-AzVirtualNetwork -ResourceName 'myVirtualNetwork' -ResourceGroupName 'myResourceGroup'
$subnet = $virtualNetwork | Select-Object -ExpandProperty subnets | Where-Object Name -eq 'mySubnet'
$plsConnection= New-AzPrivateLinkServiceConnection -Name 'MyPLSConnections' -PrivateLinkServiceId '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateLinkServices/privateLinkService' -RequestMessage 'Please Approve my request'
New-AzPrivateEndpoint -Name 'MyPrivateEndpoint' -ResourceGroupName 'myResourceGroup' -Location 'centralus' -PrivateLinkServiceConnection $plsConnection -Subnet $subnet
Parameters
-ApplicationSecurityGroup
The application security group
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AsJob
Run cmdlet as a job in the background.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ByManualRequest
Use manual request to establish the connection.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-CustomNetworkInterfaceName
The custom network interface name
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-EdgeZone
The edge zone of the private endpoint
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Force
Do not ask for confirmation to overwrite a resource.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IpConfiguration
The private endpoint IP configuration
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IpVersionType
Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. Allowed values are IPv4, IPv6, or DualStack.
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | IPv4, IPv6, DualStack |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Location
Specifies a location for the private endpoint. Use Get-AzLocation to determine valid values for this parameter.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Name of the private endpoint.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ResourceName |
Parameter sets
-PrivateLinkServiceConnection
The resource ID to connect the private endpoint.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Specifies the name of the resource group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Subnet
The subnet of the private endpoint.
Parameter properties
| Type: | PSSubnet |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Tag
Key-value pairs in the form of a hash table. For example: @{key0='value0';key1=$null;key2='value2'}
Parameter properties
| Type: | Hashtable |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
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
String
PSSubnet
PSPrivateLinkServiceConnection
Outputs
PSPrivateEndpoint
Related Links
Azure PowerShell
Feedback
Was this page helpful?
