Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

List propertyTag for specific NamedProperty: CmdLet 'Get-NamedProperty' is no longer available with Exchange Server 2010, EWS cannot be used as well ...

$
0
0

The Cmdlet "Get-NamedProperty" is no longer available with Exchange Server 2010.

E2K7:

[PS] C:\>add-pssnapin Microsoft.Exchange.Management.PowerShell.Support
[PS] C:\>get-command -Module Microsoft.Exchange.Management.PowerShell.Support

CommandType     Name
-----------     ----
Cmdlet          Get-DatabaseEvent
Cmdlet          Get-DatabaseEventWatermark
Cmdlet          Get-NamedProperty

E2K10:

[PS] C:\>add-pssnapin Microsoft.Exchange.Management.PowerShell.Support
[PS] C:\>get-command -Module Microsoft.Exchange.Management.PowerShell.Support

CommandType     Name
-----------     ----
Cmdlet          Get-CalendarValidationResult
Cmdlet          Get-DatabaseEvent
Cmdlet          Get-DatabaseEventWatermark
Cmdlet          Get-ExchangeDiagnosticInfo
Cmdlet          Test-Message

Exchange Web Service 2.0 does not provide a method to receive the list of all Named/Extended properties as well (propertyID >= 0x8000).

The Framework can only be used to search for 'known' extended properties. A propertyset, as well as the type of each property have to be specified.

Furthermore, EWS hides the property tag for Named Properties, thus the propertyID for values >= 0x8000 is $null.

How can I receive the property tag / Id for a specific named property & Exchange 2010 mailbox, when the named property has been defined as follows?

$my_MAIL_Archive = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition( [Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet]::PublicStrings, "my_MAIL_Archive", [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String)

[PS] C:\>$item.ExtendedProperties[1].PropertyDefinition

Version       : Exchange2007_SP1
PropertySet   : PublicStrings
PropertySetId :
Tag           :
Name          : my_MAIL_Archive
Id            :
MapiType      : String
Type          : System.String

Best regards,
Volker


Volker Kußmann


Viewing all articles
Browse latest Browse all 7132

Trending Articles