Azure / Azure/azure-powershell
Pulling subnets from get-azroutetable
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
Is it possible to get subnets that the routetable is assigned to from the get-azroutetable command? I have a subnet assigned to a UDR and I see it in the portable but from the command I cannot get the data. If you check the .Subnets property there are attributes but there are no values found.
### Script or Debug output
```PowerShell
PS C:\> $udrs = get-azroutetable
PS C:\> $subnets = $udr.Subnets
PS C:\> $subnets
AddressPrefix Name NetworkSecurityGroup Name RouteTable Name NatGateway Name ProvisioningState PrivateEndpointNetworkPolicies PrivateLinkServiceNetworkPolicies
------------- ---- ------------------------- --------------- --------------- ----------------- ------------------------------ ---------------------------------
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.13.2 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 7.1.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationGatewayBackendAddressPool, Add-AzApplicationGatewa…
```
### Error output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.