Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Biased
|
| 2026-01-13 00:00 | #246 | completed |
Biased
|
| 2026-01-11 00:00 | #240 | completed |
Biased
|
| 2026-01-10 00:00 | #237 | completed |
Biased
|
| 2026-01-09 00:34 | #234 | completed |
Biased
|
| 2026-01-08 00:53 | #231 | completed |
Biased
|
| 2026-01-06 18:15 | #225 | cancelled |
Clean
|
| 2025-08-17 00:01 | #83 | cancelled |
Clean
|
| 2025-07-13 21:37 | #48 | completed |
Biased
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
It can take a few minutes for the Azure Bastion host to deploy. ## Create test virtual machine In this section, you create a virtual machine that is used to test the private endpoint. Create the virtual machine with: * [Get-Credential](/powershell/module/microsoft.powershell.security/get-credential) * [New-AzNetworkInterface](/powershell/module/az.network/new-aznetworkinterface) * [New-AzVM](/powershell/module/az.compute/new-azvm) * [New-AzVMConfig](/powershell/module/az.compute/new-azvmconfig) * [Set-AzVMOperatingSystem](/powershell/module/az.compute/set-azvmoperatingsystem) * [Set-AzVMSourceImage](/powershell/module/az.compute/set-azvmsourceimage) * [Add-AzVMNetworkInterface](/powershell/module/az.compute/add-azvmnetworkinterface)
## Create a virtual network and bastion host In this section, you create a virtual network, subnet, and bastion host. The bastion host is used to connect securely to the virtual machine for testing the private endpoint. Create a virtual network and bastion host with: * [New-AzVirtualNetwork](/powershell/module/az.network/new-azvirtualnetwork) * [New-AzPublicIpAddress](/powershell/module/az.network/new-azpublicipaddress) * [New-AzBastion](/powershell/module/az.network/new-azbastion)
[!INCLUDE [ephemeral-ip-note.md](~/reusable-content/ce-skilling/azure/includes/ephemeral-ip-note.md)] ## Create an Azure SQL server In this section, you create a SQL server and database using: * [New-AzSqlServer](/powershell/module/az.sql/new-azsqlserver) * [New-AzSQlDatabase](/powershell/module/az.sql/new-azsqldatabase) Create SQL server and database. Replace **\<sql-server-name>** with your unique server name:
## Create private endpoint In this section, you create the private endpoint and connection using: * [New-AzPrivateLinkServiceConnection](/powershell/module/az.network/New-AzPrivateLinkServiceConnection) * [New-AzPrivateEndpoint](/powershell/module/az.network/new-azprivateendpoint)
## Configure the private DNS zone In this section you create and configure the private DNS zone using: * [New-AzPrivateDnsZone](/powershell/module/az.privatedns/new-azprivatednszone) * [New-AzPrivateDnsVirtualNetworkLink](/powershell/module/az.privatedns/new-azprivatednsvirtualnetworklink) * [New-AzPrivateDnsZoneConfig](/powershell/module/az.network/new-azprivatednszoneconfig) * [New-AzPrivateDnsZoneGroup](/powershell/module/az.network/new-azprivatednszonegroup)
## Test connectivity to private endpoint
In this section, you use the virtual machine you created in the previous step to connect to the SQL server across the private endpoint.
1. Sign in to the [Azure portal](https://portal.azure.com).
2. Select **Resource groups** in the left-hand navigation pane.
3. Select **CreateSQLEndpointTutorial-rg**.
4. Select **myVM**.
5. On the overview page for **myVM**, select **Connect** then **Bastion**.
6. Select the blue **Use Bastion** button.
7. Enter the username and password that you entered during the virtual machine creation.
8. Open Windows PowerShell on the server after you connect.
9. Enter `nslookup <sqlserver-name>.database.windows.net`. Replace **\<sqlserver-name>** with the name of the SQL server you created in the previous steps. You receive a message similar to what is displayed below: