New-MapiProp

Description

This cmdlet creates an in-memory MAPI property value for use in other PowerMAPI cmdlets.

Syntax
Note: Parameters in orange are optional.
New-MapiProp
-PropNameString
-PropValueObject
New-MapiProp
-PropIDMapi.NET.Tags
-PropValueObject
New-MapiProp
-PropsSystem.Collections.Hashtable
Parameters
PropNameA string value that equates to one of the prop tag values in the Mapi.NET.Tags enumeration or a hex string of a numeric prop ID.
PropIDOne of the values from the Mapi.NET.Tags enumeration.
PropValueThe value of the new property.
PropsA System.Collections.Hashtable of values where each Key in the hashtable is equatable to a property tag from Mapi.NET.Tags or is a numeric prop ID.
Remarks

This cmdlet is used to create MapiProp objects that can be used with other PowerMAPI cmdlets for setting properties on objects.

The cmdlet returns one or more PowerMAPI.MapiProp objects.

This can be useful for cases where the same property or properties must be set on multiple objects.  The MapiProp object created is a in-memory structure only and does not actually set any values on any MAPI object.

The Props parameter can be used with PowerShell's ability to create hashtables from simply text input such as: @('keyname'1 = value1; 'keyname2' = value2).  The 'keyname' in this case would be either a text value that equates to one of the Mapi.NET.Tags enumeration values, or can be a 32bit integer value of a specific prop ID.