issue while fetching details of Function App Vnet Integration Details.

Mohsin Khan 65 Reputation points
2024-02-20T07:18:06.8+00:00

Hello All,

I have couple of azure function apps in azure. i want to fetch the vnet integration details using powershell. i tried below command to get the details but not able to do. May somebody help me on below PS commands?

$functionApp = Get-AzFunctionApp -Name "abc" -ResourceGroup "mknmarble"
$ResourceGuID=$functionApp.config.VnetName

Above command is giving me id of vnet/subnet GUID from there i am not able to fetch the vnet exact name.

I tried to format the Resource ID using $ResourceGuID like /subscription/xxxx-xxx-xxxx-xxx/resroucegroup/mknmarble/......../virtualnetwork/$($ResourceGuID) but no luck.

Quick help is appreciated

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Windows for business | Windows Server | User experience | PowerShell
{count} votes

Answer accepted by question author
  1. VenkateshDodda-MSFT 25,241 Reputation points Microsoft Employee Moderator
    2024-02-21T05:23:03.9866667+00:00

    @Mohsin Khan Thanks for your response.

    Use the below cmdlet to pull VirtualNetworkSubnetId using PowerShell.

    (Get-AzResource -ResourceGroupName {ResourceGroupName} -Name {FunctionAppName} -ResourceType Microsoft.web/sites).Properties | Select-Object -Property virtualNetworkSubnetId
    

    Hope this helps, let me know if you have any further questions on this.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Mohsin Khan 65 Reputation points
    2024-02-21T05:39:34.8133333+00:00

    Thank you @VenkateshDodda-MSFT .
    Resolution Note :
    $FnAppdetails= (Get-AzResource -ResourceGroupName {ResourceGroupName} -Name {FunctionAppName} -ResourceType Microsoft.web/sites).Properties $vnet_subnet_id= $FnAppdetails | Select-Object -Property virtualNetworkSubnetId

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.