Skip to content

Resource : {0}, not found - incomplete error messages using multiple Network cmdlets  #4223

@tylerd

Description

@tylerd

Cmdlet(s)

Add-AzureRmVpnClientRevokedCertificate
Add-AzureRmVpnClientRootCertificate
Get-AzureRmVpnClientPackage
Remove-AzureRmVirtualNetworkGatewayDefaultSite
Remove-AzureRmVpnClientRevokedCertificate
Remove-AzureRmVpnClientRootCertificate
Set-AzureRmVirtualNetworkGatewayDefaultSite
Set-AzureRmVirtualNetworkGatewayVpnClientConfig
Set-AzureRmVirtualNetworkGateway

PowerShell Version

5.1.15063.413

Module Version

AzureRm.Network 4.1.0

OS Version

10.0.15063.413

Description

Error message "Resource : {0}, not found" when resource or resource group does not exist.
The message does not seem to be formatted correctly and is not helpful to the user.

Debug Output

C:\> $DebugPreference=Continue
C:\> Add-AzureRmVpnClientRevokedCertificate -ResourceGroupName testrg -VirtualNetworkGatewayName testgw -VpnClientRevokedCertificateName something -Thumbprint 1234
Add-AzureRmVpnClientRevokedCertificate : Resource : {0}, not found
At line:1 char:1
+ Add-AzureRmVpnClientRevokedCertificate -ResourceGroupName testrg -Vir ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Add-AzureRmVpnClientRevokedCertificate], ArgumentException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.AddAzureVpnClientRevokedCertificateCommand

Script/Steps for Reproduction

Login to AzureRm
Execute any of the above commands with parameters for a resource that does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NetworkService AttentionThis issue is responsible by Azure service team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions