This article shows you how to set up Private Link with Azure Virtual Desktop to privately connect to your remote resources. For more information about using Private Link with Azure Virtual Desktop, including limitations, see Azure Private Link with Azure Virtual Desktop.
Prerequisites
In order to use Private Link with Azure Virtual Desktop, you need the following things:
To use of Private Link with Azure Virtual Desktop, first you need to re-register the Microsoft.DesktopVirtualization resource provider and register the Azure Virtual Desktop Private Link feature on your Azure subscription.
Important
You need to re-register the resource provider and register the feature for each subscription you want to use Private Link with Azure Virtual Desktop.
Re-register the resource provider
To re-register the Microsoft.DesktopVirtualization resource provider:
In the search bar, enter Subscriptions and select the matching service entry.
Select the name of your subscription, then in the Settings section, select Preview features.
Select the drop-down list for the filter Type and set it to Microsoft.DesktopVirtualization.
Select Azure Virtual Desktop Private Link, then select Register.
Create private endpoints
During the setup process, you create private endpoints to the following resources:
Purpose
Resource type
Target sub-resource
Quantity
Private DNS zone name
Connections to host pools
Microsoft.DesktopVirtualization/hostpools
connection
One per host pool
privatelink.wvd.microsoft.com
Feed download
Microsoft.DesktopVirtualization/workspaces
feed
One per workspace
privatelink.wvd.microsoft.com
Initial feed discovery
Microsoft.DesktopVirtualization/workspaces
global
Only one for all your Azure Virtual Desktop deployments
privatelink-global.wvd.microsoft.com
Connections to host pools
To create a private endpoint for the connection sub-resource for connections to a host pool, select the relevant tab for your scenario and follow the steps.
In the search bar, type Azure Virtual Desktop and select the matching service entry to go to the Azure Virtual Desktop overview.
Select Host pools, then select the name of the host pool for which you want to create a connection sub-resource.
From the host pool overview, select Networking, then Private endpoint connections, and finally New private endpoint.
On the Basics tab, complete the following information:
Parameter
Value/Description
Subscription
Select the subscription you want to create the private endpoint in from the drop-down list.
Resource group
This automatically defaults to the same resource group as your workspace for the private endpoint, but you can also select an alternative existing one from the drop-down list, or create a new one.
Name
Enter a name for the new private endpoint.
Network interface name
The network interface name fills in automatically based on the name you gave the private endpoint, but you can also specify a different name.
Region
This automatically defaults to the same Azure region as the workspace and is where the private endpoint is deployed. This must be the same region as your virtual network and session hosts.
Once you've completed this tab, select Next: Resource.
On the Resource tab, validate the values for Subscription, Resource type, and Resource, then for Target sub-resource, select connection. Once you've completed this tab, select Next: Virtual Network.
On the Virtual Network tab, complete the following information:
Parameter
Value/Description
Virtual network
Select the virtual network you want to create the private endpoint in from the drop-down list.
Subnet
Select the subnet of the virtual network you want to create the private endpoint in from the drop-down list.
Select Dynamically allocate IP address or Statically allocate IP address. The address space is from the subnet you selected.
If you choose to statically allocate IP addresses, you need to fill in the Name and Private IP for each listed member.
Application security group
Optional: select an existing application security group for the private endpoint from the drop-down list, or create a new one. You can also add one later.
Once you've completed this tab, select Next: DNS.
On the DNS tab, choose whether you want to use Azure Private DNS Zone by selecting Yes or No for Integrate with private DNS zone. If you select Yes, select the subscription and resource group in which to create the private DNS zone privatelink.wvd.microsoft.com. For more information, see Azure Private Endpoint DNS configuration.
Once you've completed this tab, select Next: Tags.
Optional: On the Tags tab, you can enter any name/value pairs you need, then select Next: Review + create.
On the Review + create tab, ensure validation passes and review the information that is used during deployment.
Select Create to create the private endpoint for the connection sub-resource.
Here's how to create a private endpoint for the connection sub-resource used for connections to a host pool using the network and desktopvirtualization extensions for Azure CLI.
Important
In the following examples, you'll need to change the <placeholder> values for your own.
Launch the Azure Cloud Shell in the Azure portal with the Bash terminal type, or run Azure CLI on your local device.
Create a Private Link service connection and the private endpoint for a host pool with the connection sub-resource by running the commands in one of the following examples.
To create a private endpoint with a dynamically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network and session hosts.
location=<Location>
# Get the resource ID of the host pool
hostPoolId=$(az desktopvirtualization hostpool show \
--name <HostPoolName> \
--resource-group <ResourceGroupName> \
--query [id] \
--output tsv)
# Create a service connection and the private endpoint
az network private-endpoint create \
--name <PrivateEndpointName> \
--resource-group <ResourceGroupName> \
--location $location \
--vnet-name <VNetName> \
--subnet <SubnetName> \
--connection-name <ConnectionName> \
--private-connection-resource-id $hostPoolId \
--group-id connection \
--output table
To create a private endpoint with statically allocated IP addresses:
# Specify the Azure region. This must be the same region as your virtual network and session hosts.
location=<Location>
# Get the resource ID of the host pool
hostPoolId=$(az desktopvirtualization hostpool show \
--name <HostPoolName> \
--resource-group <ResourceGroupName> \
--query [id] \
--output tsv)
# Store each private endpoint IP configuration in a variable
ip1={name:ipconfig1,group-id:connection,member-name:broker,private-ip-address:<IPAddress>}
ip2={name:ipconfig2,group-id:connection,member-name:diagnostics,private-ip-address:<IPAddress>}
ip3={name:ipconfig3,group-id:connection,member-name:gateway-ring-map,private-ip-address:<IPAddress>}
ip4={name:ipconfig4,group-id:connection,member-name:web,private-ip-address:<IPAddress>}
# Create a service connection and the private endpoint
az network private-endpoint create \
--name <PrivateEndpointName> \
--resource-group <ResourceGroupName> \
--location $location \
--vnet-name <VNetName> \
--subnet <SubnetName> \
--connection-name <ConnectionName> \
--private-connection-resource-id $hostPoolId \
--group-id connection \
--ip-configs [$ip1,$ip2,$ip3,$ip4] \
--output table
Your output should be similar to the following. Check that the value for ProvisioningState is Succeeded.
You need to configure DNS for your private endpoint to resolve the DNS name of the private endpoint in the virtual network. The private DNS zone name is privatelink.wvd.microsoft.com. For the steps to create and configure the private DNS zone with Azure CLI, see Configure the private DNS zone.
Here's how to create a private endpoint for the connection sub-resource used for connections to a host pool using the Az.Network and Az.DesktopVirtualization PowerShell modules.
Important
In the following examples, you'll need to change the <placeholder> values for your own.
Launch the Azure Cloud Shell in the Azure portal with the PowerShell terminal type, or run PowerShell on your local device.
Get the details of the virtual network and subnet you want to use for the private endpoint and store them in a variable by running the following commands:
# Get the subnet details for the virtual network
$subnet = (Get-AzVirtualNetwork -Name <VNetName> -ResourceGroupName <ResourceGroupName>).Subnets | ? Name -eq <SubnetName>
Create a Private Link service connection for a host pool with the connection sub-resource by running the following commands.
# Get the resource ID of the host pool
$hostPoolId = (Get-AzWvdHostPool -Name <HostPoolName> -ResourceGroupName <ResourceGroupName>).Id
# Create the service connection
$parameters = @{
Name = '<ServiceConnectionName>'
PrivateLinkServiceId = $hostPoolId
GroupId = 'connection'
}
$serviceConnection = New-AzPrivateLinkServiceConnection @parameters
Finally, create the private endpoint by running the commands in one of the following examples.
To create a private endpoint with a dynamically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network and session hosts.
$location = '<Location>'
# Create the private endpoint
$parameters = @{
Name = '<PrivateEndpointName>'
ResourceGroupName = '<ResourceGroupName>'
Location = $location
Subnet = $subnet
PrivateLinkServiceConnection = $serviceConnection
}
New-AzPrivateEndpoint @parameters
To create a private endpoint with statically allocated IP addresses:
# Specify the Azure region. This must be the same region as your virtual network and session hosts.
$location = '<Location>'
# Create a hash table for each private endpoint IP configuration
$ip1 = @{
Name = 'ipconfig1'
GroupId = 'connection'
MemberName = 'broker'
PrivateIPAddress = '<IPAddress>'
}
$ip2 = @{
Name = 'ipconfig2'
GroupId = 'connection'
MemberName = 'diagnostics'
PrivateIPAddress = '<IPAddress>'
}
$ip3 = @{
Name = 'ipconfig3'
GroupId = 'connection'
MemberName = 'gateway-ring-map'
PrivateIPAddress = '<IPAddress>'
}
$ip4 = @{
Name = 'ipconfig4'
GroupId = 'connection'
MemberName = 'web'
PrivateIPAddress = '<IPAddress>'
}
# Create the private endpoint IP configurations
$ipConfig1 = New-AzPrivateEndpointIpConfiguration @ip1
$ipConfig2 = New-AzPrivateEndpointIpConfiguration @ip2
$ipConfig3 = New-AzPrivateEndpointIpConfiguration @ip3
$ipConfig4 = New-AzPrivateEndpointIpConfiguration @ip4
# Create the private endpoint
$parameters = @{
Name = '<PrivateEndpointName>'
ResourceGroupName = '<ResourceGroupName>'
Location = $location
Subnet = $subnet
PrivateLinkServiceConnection = $serviceConnection
IpConfiguration = $ipConfig1, $ipConfig2, $ipConfig3, $ipConfig4
}
New-AzPrivateEndpoint @parameters
Your output should be similar to the following. Check that the value for ProvisioningState is Succeeded.
You need to configure DNS for your private endpoint to resolve the DNS name of the private endpoint in the virtual network. The private DNS zone name is privatelink.wvd.microsoft.com. For the steps to create and configure the private DNS zone with Azure PowerShell, see Configure the private DNS zone.
Important
You need to create a private endpoint for the connection sub-resource for each host pool you want to use with Private Link.
Feed download
To create a private endpoint for the feed sub-resource for a workspace, select the relevant tab for your scenario and follow the steps.
From the Azure Virtual Desktop overview, select Workspaces, then select the name of the workspace for which you want to create a feed sub-resource.
From the workspace overview, select Networking, then Private endpoint connections, and finally New private endpoint.
On the Basics tab, complete the following information:
Parameter
Value/Description
Subscription
Select the subscription you want to create the private endpoint in from the drop-down list.
Resource group
This automatically defaults to the same resource group as your workspace for the private endpoint, but you can also select an alternative existing one from the drop-down list, or create a new one.
Name
Enter a name for the new private endpoint.
Network interface name
The network interface name fills in automatically based on the name you gave the private endpoint, but you can also specify a different name.
Region
This automatically defaults to the same Azure region as the workspace and is where the private endpoint is deployed. This must be the same region as your virtual network.
Once you've completed this tab, select Next: Resource.
On the Resource tab, validate the values for Subscription, Resource type, and Resource, then for Target sub-resource, select feed. Once you've completed this tab, select Next: Virtual Network.
On the Virtual Network tab, complete the following information:
Parameter
Value/Description
Virtual network
Select the virtual network you want to create the private endpoint in from the drop-down list.
Subnet
Select the subnet of the virtual network you want to create the private endpoint in from the drop-down list.
Select Dynamically allocate IP address or Statically allocate IP address. The address space is from the subnet you selected.
If you choose to statically allocate IP addresses, you need to fill in the Name and Private IP for each listed member.
Application security group
Optional: select an existing application security group for the private endpoint from the drop-down list, or create a new one. You can also add one later.
Once you've completed this tab, select Next: DNS.
On the DNS tab, choose whether you want to use Azure Private DNS Zone by selecting Yes or No for Integrate with private DNS zone. If you select Yes, select the subscription and resource group in which to create the private DNS zone privatelink.wvd.microsoft.com. For more information, see Azure Private Endpoint DNS configuration.
Once you've completed this tab, select Next: Tags.
Optional: On the Tags tab, you can enter any name/value pairs you need, then select Next: Review + create.
On the Review + create tab, ensure validation passes and review the information that is used during deployment.
Select Create to create the private endpoint for the feed sub-resource.
In the same CLI session, create a Private Link service connection and the private endpoint for a workspace with the feed sub-resource by running the following commands.
To create a private endpoint with a dynamically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network.
location=<Location>
# Get the resource ID of the workspace
workspaceId=$(az desktopvirtualization workspace show \
--name <WorkspaceName> \
--resource-group <ResourceGroupName> \
--query [id] \
--output tsv)
# Create a service connection and the private endpoint
az network private-endpoint create \
--name <PrivateEndpointName> \
--resource-group <ResourceGroupName> \
--location $location \
--vnet-name <VNetName> \
--subnet <SubnetName> \
--connection-name <ConnectionName> \
--private-connection-resource-id $workspaceId \
--group-id feed \
--output table
To create a private endpoint with statically allocated IP addresses:
# Specify the Azure region. This must be the same region as your virtual network.
location=<Location>
# Get the resource ID of the workspace
workspaceId=$(az desktopvirtualization workspace show \
--name <WorkspaceName> \
--resource-group <ResourceGroupName> \
--query [id] \
--output tsv)
# Store each private endpoint IP configuration in a variable
ip1={name:ipconfig1,group-id:feed,member-name:web-r1,private-ip-address:<IPAddress>}
ip2={name:ipconfig2,group-id:feed,member-name:web-r0,private-ip-address:<IPAddress>}
# Create a service connection and the private endpoint
az network private-endpoint create \
--name <PrivateEndpointName> \
--resource-group <ResourceGroupName> \
--location $location \
--vnet-name <VNetName> \
--subnet <SubnetName> \
--connection-name <ConnectionName> \
--private-connection-resource-id $workspaceId \
--group-id feed \
--ip-configs [$ip1,$ip2] \
--output table
Your output should be similar to the following. Check that the value for ProvisioningState is Succeeded.
You need to configure DNS for your private endpoint to resolve the DNS name of the private endpoint in the virtual network. The private DNS zone name is privatelink.wvd.microsoft.com. For the steps to create and configure the private DNS zone with Azure CLI, see Configure the private DNS zone.
In the same PowerShell session, create a Private Link service connection for a workspace with the feed sub-resource by running the following commands. In these examples, the same virtual network and subnet are used.
# Get the resource ID of the workspace
$workspaceId = (Get-AzWvdWorkspace -Name <WorkspaceName> -ResourceGroupName <ResourceGroupName>).Id
# Create the service connection
$parameters = @{
Name = '<ServiceConnectionName>'
PrivateLinkServiceId = $workspaceId
GroupId = 'feed'
}
$serviceConnection = New-AzPrivateLinkServiceConnection @parameters
Finally, create the private endpoint by running the commands in one of the following examples.
To create a private endpoint with a dynamically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network.
$location = '<Location>'
# Create the private endpoint
$parameters = @{
Name = '<PrivateEndpointName>'
ResourceGroupName = '<ResourceGroupName>'
Location = $location
Subnet = $subnet
PrivateLinkServiceConnection = $serviceConnection
}
New-AzPrivateEndpoint @parameters
To create a private endpoint with a statically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network.
$location = '<Location>'
# Create a hash table for each private endpoint IP configuration
$ip1 = @{
Name = 'ipconfig1'
GroupId = 'feed'
MemberName = 'web-r1'
PrivateIPAddress = '<IPAddress>'
}
$ip2 = @{
Name = 'ipconfig2'
GroupId = 'feed'
MemberName = 'web-r0'
PrivateIPAddress = '<IPAddress>'
}
# Create the private endpoint IP configurations
$ipConfig1 = New-AzPrivateEndpointIpConfiguration @ip1
$ipConfig2 = New-AzPrivateEndpointIpConfiguration @ip2
# Create the private endpoint
$parameters = @{
Name = '<PrivateEndpointName>'
ResourceGroupName = '<ResourceGroupName>'
Location = $location
Subnet = $subnet
PrivateLinkServiceConnection = $serviceConnection
IpConfiguration = $ipConfig1, $ipConfig2
}
New-AzPrivateEndpoint @parameters
Your output should be similar to the following. Check that the value for ProvisioningState is Succeeded.
You need to configure DNS for your private endpoint to resolve the DNS name of the private endpoint in the virtual network. The private DNS zone name is privatelink.wvd.microsoft.com. For the steps to create and configure the private DNS zone with Azure PowerShell, see Configure the private DNS zone.
Important
You need to a create private endpoint for the feed sub-resource for each workspace you want to use with Private Link.
Initial feed discovery
To create a private endpoint for the global sub-resource used for the initial feed discovery, select the relevant tab for your scenario and follow the steps.
Important
Only create one private endpoint for the global sub-resource for all your Azure Virtual Desktop deployments.
A private endpoint to the global sub-resource of any workspace controls the shared fully qualified domain name (FQDN) for initial feed discovery. This in turn enables feed discovery for all workspaces. Because the workspace connected to the private endpoint is so important, deleting it will cause all feed discovery processes to stop working. We recommend you create an unused placeholder workspace for the global sub-resource.
From the Azure Virtual Desktop overview, select Workspaces, then select the name of a workspace you want to use for the global sub-resource.
Optional: Instead, create a placeholder workspace to terminate the global endpoint by following the instructions to Create a workspace.
From the workspace overview, select Networking, then Private endpoint connections, and finally New private endpoint.
On the Basics tab, complete the following information:
Parameter
Value/Description
Subscription
Select the subscription you want to create the private endpoint in from the drop-down list.
Resource group
This automatically defaults to the same resource group as your workspace for the private endpoint, but you can also select an alternative existing one from the drop-down list, or create a new one.
Name
Enter a name for the new private endpoint.
Network interface name
The network interface name fills in automatically based on the name you gave the private endpoint, but you can also specify a different name.
Region
This automatically defaults to the same Azure region as the workspace and is where the private endpoint will be deployed. This must be the same region as your virtual network.
Once you've completed this tab, select Next: Resource.
On the Resource tab, validate the values for Subscription, Resource type, and Resource, then for Target sub-resource, select global. Once you've completed this tab, select Next: Virtual Network.
On the Virtual Network tab, complete the following information:
Parameter
Value/Description
Virtual network
Select the virtual network you want to create the private endpoint in from the drop-down list.
Subnet
Select the subnet of the virtual network you want to create the private endpoint in from the drop-down list.
Select Dynamically allocate IP address or Statically allocate IP address. The address space is from the subnet you selected.
If you choose to statically allocate IP addresses, you need to fill in the Name and Private IP for each listed member.
Application security group
Optional: select an existing application security group for the private endpoint from the drop-down list, or create a new one. You can also add one later.
Once you've completed this tab, select Next: DNS.
On the DNS tab, choose whether you want to use Azure Private DNS Zone by selecting Yes or No for Integrate with private DNS zone. If you select Yes, select the subscription and resource group in which to create the private DNS zone privatelink-global.wvd.microsoft.com. For more information, see Azure Private Endpoint DNS configuration.
Once you've completed this tab, select Next: Tags.
Optional: On the Tags tab, you can enter any name/value pairs you need, then select Next: Review + create.
On the Review + create tab, ensure validation passes and review the information that is used during deployment.
Select Create to create the private endpoint for the global sub-resource.
Optional: Create a placeholder workspace to terminate the global endpoint by following the instructions to Create a workspace.
In the same CLI session, create a Private Link service connection and the private endpoint for the workspace with the global sub-resource by running the following commands:
To create a private endpoint with a dynamically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network.
location=<Location>
# Get the resource ID of the workspace
workspaceId=$(az desktopvirtualization workspace show \
--name <WorkspaceName> \
--resource-group <ResourceGroupName> \
--query [id] \
--output tsv)
# Create a service connection and the private endpoint
az network private-endpoint create \
--name <PrivateEndpointName> \
--resource-group <ResourceGroupName> \
--location $location \
--vnet-name <VNetName> \
--subnet <SubnetName> \
--connection-name <ConnectionName> \
--private-connection-resource-id $workspaceId \
--group-id global \
--output table
To create a private endpoint with statically allocated IP addresses:
# Specify the Azure region. This must be the same region as your virtual network.
location=<Location>
# Get the resource ID of the workspace
workspaceId=$(az desktopvirtualization workspace show \
--name <WorkspaceName> \
--resource-group <ResourceGroupName> \
--query [id] \
--output tsv)
# Store each private endpoint IP configuration in a variable
ip={name:ipconfig,group-id:global,member-name:web,private-ip-address:<IPAddress>}
# Create a service connection and the private endpoint
az network private-endpoint create \
--name <PrivateEndpointName> \
--resource-group <ResourceGroupName> \
--location $location \
--vnet-name <VNetName> \
--subnet <SubnetName> \
--connection-name <ConnectionName> \
--private-connection-resource-id $workspaceId \
--group-id global \
--ip-config $ip \
--output table
Your output should be similar to the following. Check that the value for ProvisioningState is Succeeded.
You need to configure DNS for your private endpoint to resolve the DNS name of the private endpoint in the virtual network. The private DNS zone name is privatelink-global.wvd.microsoft.com. For the steps to create and configure the private DNS zone with Azure CLI, see Configure the private DNS zone.
Optional: Create a placeholder workspace to terminate the global endpoint by following the instructions to Create a workspace.
In the same PowerShell session, create a Private Link service connection for the workspace with the global sub-resource by running the following commands. In these examples, the same virtual network and subnet are used.
# Get the resource ID of the workspace
$workspaceId = (Get-AzWvdWorkspace -Name <WorkspaceName> -ResourceGroupName <ResourceGroupName>).Id
# Create the service connection
$parameters = @{
Name = '<ServiceConnectionName>'
PrivateLinkServiceId = $workspaceId
GroupId = 'global'
}
$serviceConnection = New-AzPrivateLinkServiceConnection @parameters
Finally, create the private endpoint by running the commands in one of the following examples.
To create a private endpoint with a dynamically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network.
$location = '<Location>'
# Create the private endpoint
$parameters = @{
Name = '<PrivateEndpointName>'
ResourceGroupName = '<ResourceGroupName>'
Location = $location
Subnet = $subnet
PrivateLinkServiceConnection = $serviceConnection
}
New-AzPrivateEndpoint @parameters
To create a private endpoint with a statically allocated IP address:
# Specify the Azure region. This must be the same region as your virtual network.
$location = '<Location>'
$ip = @{
Name = '<IPConfigName>'
GroupId = 'global'
MemberName = 'web'
PrivateIPAddress = '<IPAddress>'
}
$ipConfig = New-AzPrivateEndpointIpConfiguration @ip
# Create the private endpoint
$parameters = @{
Name = '<PrivateEndpointName>'
ResourceGroupName = '<ResourceGroupName>'
Location = $location
Subnet = $subnet
PrivateLinkServiceConnection = $serviceConnection
IpConfiguration = $ipconfig
}
New-AzPrivateEndpoint @parameters
Your output should be similar to the following. Check that the value for ProvisioningState is Succeeded.
You need to configure DNS for your private endpoint to resolve the DNS name of the private endpoint in the virtual network. The private DNS zone name is privatelink-global.wvd.microsoft.com. For the steps to create and configure the private DNS zone with Azure PowerShell, see Configure the private DNS zone.
Closing public routes
Once you've created private endpoints, you can also control if traffic is allowed to come from public routes. You can control this at a granular level using Azure Virtual Desktop, or more broadly using a network security group (NSG) or Azure Firewall.
Control routes with Azure Virtual Desktop
With Azure Virtual Desktop, you can independently control public traffic for workspaces and host pools. Select the relevant tab for your scenario and follow the steps. You can't configure this in Azure CLI. You need to repeat these steps for each workspace and host pool you use with Private Link.
From the Azure Virtual Desktop overview, select Workspaces, then select the name of the workspace to control public traffic.
From the host pool overview, select Networking, then select the Public access tab.
Select one of the following options:
Setting
Description
Enable public access from all networks
End users can access the feed over the public internet or the private endpoints.
Disable public access and use private access
End users can only access the feed over the private endpoints.
Select Save.
Host pools
From the Azure Virtual Desktop overview, select Host pools, then select the name of the host pool to control public traffic.
From the host pool overview, select Networking, then select the Public access tab.
Select one of the following options:
Setting
Description
Enable public access from all networks
End users can access the feed and session hosts securely over the public internet or the private endpoints.
Enable public access for end users, use private access for session hosts
End users can access the feed securely over the public internet but must use private endpoints to access session hosts.
Disable public access and use private access
End users can only access the feed and session hosts over the private endpoints.
Select Save.
Important
You need to use the preview version of the Az.DesktopVirtualization module to run the following commands. For more information and to download and install the preview module, see PowerShell Gallery.
Workspaces
In the same PowerShell session, you can disable public access and use private access by running the following command:
Changing access for session hosts won't affect existing sessions. You must restart the session host virtual machines for the change to take effect.
Block public routes with network security groups or Azure Firewall
If you're using network security groups or Azure Firewall to control connections from user client devices or your session hosts to the private endpoints, you can use the WindowsVirtualDesktop service tag to block traffic from the public internet. If you block public internet traffic using this service tag, all service traffic uses private routes only.
Caution
Make sure you don't block traffic between your private endpoints and the addresses in the required URL list.
Don't block certain ports from either the user client devices or your session hosts to the private endpoint for a host pool resource using the connection sub-resource. The entire TCP dynamic port range of 1 - 65535 to the private endpoint is needed because port mapping is used to all global gateways through the single private endpoint IP address corresponding to the connection sub-resource. If you restrict ports to the private endpoint, your users may not be able to connect successfully to Azure Virtual Desktop.
Validate Private Link with Azure Virtual Desktop
Once you've closed public routes, you should validate that Private Link with Azure Virtual Desktop is working. You can do this by checking the connection state of each private endpoint, the status of your session hosts, and testing your users can refresh and connect to their remote resources.
Check the connection state of each private endpoint
To check the connection state of each private endpoint, select the relevant tab for your scenario and follow the steps. You should repeat these steps for each workspace and host pool you use with Private Link.
You need to use the preview version of the Az.DesktopVirtualization module to run the following commands. For more information and to download and install the preview module, see PowerShell Gallery.
Workspaces
In the same PowerShell session, run the following commands to check the connection state of a workspace: