diff --git a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyCmdletBase.cs b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyCmdletBase.cs index 073cddfe6956..c8ff86927516 100644 --- a/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyCmdletBase.cs +++ b/src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyCmdletBase.cs @@ -88,8 +88,8 @@ protected PSObject[] GetFilteredOutputObjects(string resourceType, ListFilter fi return true; } - var policyType = result.Properties["PolicyType"]; - return policyType == null || string.Equals(policyType.Value.ToString(), filter.ToString(), StringComparison.OrdinalIgnoreCase); + var policyType = ((PSObject)result.Properties["Properties"].Value).Properties["policyType"].Value; + return policyType == null || string.Equals(policyType.ToString(), filter.ToString(), StringComparison.OrdinalIgnoreCase); }; return resources