Get-AzPrivateEndpoint powershell command is not working as expected

Apurva Pathak 120 Reputation points

hi folks,

I am trying to use 'Get-AzPrivateEndpoint' to query properties and configurations of my private endpoints but it is not working as expected. It doesn't show the expected results. Below are the details:

Result that I am getting is below (I am unable to query IP or DNS configs):

PS C:\Users\apurva.pathak> $privateEndpoint = Get-AzPrivateEndpoint -ResourceGroupName $resourceGroupName -Name $pe_name

PS C:\Users\apurva.pathak> $privateEndpoint

ResourceGroupName                  Name                             Location ProvisioningState Subnet
-----------------                  ----                             -------- ----------------- ------
SpeciesAI-dev-1.00-001-Platform-RG SpeciesAI-dev-MachineLearning-pe uksouth  Succeeded               

PS C:\Users\apurva.pathak> $privateEndpoint.Subnet

AddressPrefix Name NetworkSecurityGroup Name RouteTable Name NatGateway Name ProvisioningState PrivateEndpointNetworkPolicies PrivateLinkServiceNetworkPolicies
------------- ---- ------------------------- --------------- --------------- ----------------- ------------------------------ ---------------------------------

PS C:\Users\apurva.pathak> $privateEndpoint.IpConfigurations

PS C:\Users\apurva.pathak> $privateEndpoint.CustomDnsConfigs

PS C:\Users\apurva.pathak> 

Expected result as per MS docs (

Get-AzPrivateEndpoint -Name MyPrivateEndpoint1 -ResourceGroupName TestResourceGroup

Name                                : MyPrivateEndpoint1
ResourceGroupName                   : TestResourceGroup
Location                            : eastus2euap
Id                                  : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/provi
Etag                                : W/"00000000-0000-0000-0000-000000000000"
ProvisioningState                   : Succeeded
Subnet                              : {
                                        "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVirtualNetwork1/subnets/backendSubnet",
NetworkInterfaces                   : [

                                          "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/networkInterfaces/MyNic1",
PrivateLinkServiceConnections       : []
ManualPrivateLinkServiceConnections : [
                                          "Name": "MyPrivateLinkServiceConnection",
                                          "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/privateEndpoints/MyPrivateEndpoint1/manualPrivateLinkServi
                                          "PrivateLinkServiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/
                                          "PrivateLinkServiceConnectionState": {
                                            "Status": "Pending",
                                            "Description": "Awaiting approval"
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
384 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,319 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 15,961 Reputation points Microsoft Employee

    @Apurva Pathak

    Thank you for reaching out.

    I was able to reproduce this issue on my end and I have reported it as a bug to the PowerShell Team here

    I was able to get the required details using Az CLI command "az network private-endpoint show" and also using the REST API Call Private Endpoints - Get

    Hope this helps! Please let me know if you have any additional questions. Thank you!

    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful