diff --git a/src/ResourceManager/Network/ChangeLog.md b/src/ResourceManager/Network/ChangeLog.md
index 803d574061f6..b17842878b16 100644
--- a/src/ResourceManager/Network/ChangeLog.md
+++ b/src/ResourceManager/Network/ChangeLog.md
@@ -20,6 +20,7 @@
## Current Release
* Fix issue with Default Resource Group in CloudShell
+* Fix error message with Network cmdlets
## Version 5.4.0
* Updating model types for compatibility with DNS cmdlets.
diff --git a/src/ResourceManager/Network/Commands.Network/Properties/Resources.Designer.cs b/src/ResourceManager/Network/Commands.Network/Properties/Resources.Designer.cs
index 7000358dd2d9..21316bf2cfeb 100644
--- a/src/ResourceManager/Network/Commands.Network/Properties/Resources.Designer.cs
+++ b/src/ResourceManager/Network/Commands.Network/Properties/Resources.Designer.cs
@@ -358,7 +358,7 @@ public static string ResourceGroupNotSet {
}
///
- /// Looks up a localized string similar to Resource : {0}, not found.
+ /// Looks up a localized string similar to Resource '{0}' not found.
///
public static string ResourceNotFound {
get {
diff --git a/src/ResourceManager/Network/Commands.Network/Properties/Resources.resx b/src/ResourceManager/Network/Commands.Network/Properties/Resources.resx
index d18be2a0d511..4fe12dbfe6f7 100644
--- a/src/ResourceManager/Network/Commands.Network/Properties/Resources.resx
+++ b/src/ResourceManager/Network/Commands.Network/Properties/Resources.resx
@@ -168,7 +168,7 @@
ResourceGroupNotSet
- Resource : {0}, not found
+ Resource '{0}' not found
SetByResource
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs
index 49c858ce5bdc..fe11bc3dd942 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs
@@ -63,7 +63,7 @@ public override void Execute()
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(ResourceGroupName, VirtualNetworkGatewayName))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, VirtualNetworkGatewayName));
}
var vnetGateway = this.GetVirtualNetworkGateway(this.ResourceGroupName, this.VirtualNetworkGatewayName);
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs
index a79cf3094221..10773de26e9b 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRootCertificateCommand.cs
@@ -64,7 +64,7 @@ public override void Execute()
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(ResourceGroupName, VirtualNetworkGatewayName))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, VirtualNetworkGatewayName));
}
var vnetGateway = this.GetVirtualNetworkGateway(this.ResourceGroupName, this.VirtualNetworkGatewayName);
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs
index c92a6d6388cd..1c461fe34236 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/GenerateAzureVpnClientPackage.cs
@@ -55,7 +55,7 @@ public override void Execute()
if (!this.IsVirtualNetworkGatewayPresent(ResourceGroupName, VirtualNetworkGatewayName))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, VirtualNetworkGatewayName));
}
PSVpnClientParameters vpnClientParams = new PSVpnClientParameters();
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs
index 52e560684bbd..5ebbf2eb411e 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVirtualNetworkGatewayDefaultSiteCommand.cs
@@ -37,7 +37,7 @@ public override void Execute()
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(this.VirtualNetworkGateway.ResourceGroupName, this.VirtualNetworkGateway.Name))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, this.VirtualNetworkGateway.Name));
}
this.VirtualNetworkGateway.GatewayDefaultSite = null;
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs
index 32fa3c2378be..51a60d808e6d 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRevokedCertificateCommand.cs
@@ -61,7 +61,7 @@ public override void Execute()
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(ResourceGroupName, VirtualNetworkGatewayName))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, VirtualNetworkGatewayName));
}
var vnetGateway = this.GetVirtualNetworkGateway(this.ResourceGroupName, this.VirtualNetworkGatewayName);
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs
index 8bd8129c42fd..f4a11172aab9 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/RemoveAzureVpnClientRootCertificateCommand.cs
@@ -62,7 +62,7 @@ public override void Execute()
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(ResourceGroupName, VirtualNetworkGatewayName))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, VirtualNetworkGatewayName));
}
var vnetGateway = this.GetVirtualNetworkGateway(this.ResourceGroupName, this.VirtualNetworkGatewayName);
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs
index 613c9901506b..44576e911a99 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayDefaultSiteCommand.cs
@@ -45,7 +45,7 @@ public override void Execute()
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(this.VirtualNetworkGateway.ResourceGroupName, this.VirtualNetworkGateway.Name))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, this.VirtualNetworkGateway.Name));
}
this.VirtualNetworkGateway.GatewayDefaultSite = new PSResourceId();
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs
index 984120da3a76..07d90fc7a5ac 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs
@@ -81,7 +81,7 @@ public override void Execute()
if (!this.IsVirtualNetworkGatewayPresent(this.VirtualNetworkGateway.ResourceGroupName, this.VirtualNetworkGateway.Name))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, this.VirtualNetworkGateway.Name));
}
if (this.VirtualNetworkGateway.VpnClientConfiguration == null)
diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/UpdateAzureVirtualNetworkGatewayCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/UpdateAzureVirtualNetworkGatewayCommand.cs
index 8da445de8a29..0309212d5205 100644
--- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/UpdateAzureVirtualNetworkGatewayCommand.cs
+++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/UpdateAzureVirtualNetworkGatewayCommand.cs
@@ -141,7 +141,7 @@ public override void Execute()
if (!this.IsVirtualNetworkGatewayPresent(this.VirtualNetworkGateway.ResourceGroupName, this.VirtualNetworkGateway.Name))
{
- throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
+ throw new ArgumentException(string.Format(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound, this.VirtualNetworkGateway.Name));
}
if (this.EnableActiveActiveFeature.IsPresent && this.DisableActiveActiveFeature.IsPresent)