The property cannot be processed because the property type already exists

New Contributor

I receive the above message when running the below command.

Get-RetentionCompliancePolicy -identity "Name of Policy" -DistributionDetail | Select-Object -property @{n"Policy Name";e={$_.Name}},@{n=User";e{$_.ExchangeLocation}}

 

I do see the results I want after the errors appear. Im trying to understand why the errors appear to improve my knowledge

2 Replies

You have a bunch of syntax errors, mostly missing "=". Try this:

 

Get-RetentionCompliancePolicy -DistributionDetail | Select-Object -property @{n="Policy Name";e={$_.Name}},@{n="User";e={$_.ExchangeLocation}}

@Vasil Michev 

Hey,

Thank you so much for your quick response.

The syntax works, but I was aiming to display the user's email address along with the name of the policy.

Both have the property value of Name

Get-RetentionCompliancePolicy -DistributionDetail | Select -ExpandProperty ExchangeLocation | Select Name