Get-MapiProvider

Description

This cmdlet retrieves one or more MAPI provider objects from a profile's Service object.

Syntax
Note: Parameters in orange are optional.
Get-MapiProvider
-ServiceIMapiObject[]
-ProviderIDGuid[]
Get-MapiProvider
-ProfileNameString
-ProviderIDGuid[]
Parameters
ServiceA list of one or more MapiObject<mapi .NET.Profiles.Service> objects.
ProfileNameA String that is the name of an existing profile from which to retrieve one or more providers.
ProviderIDAn optional list of one or more Guid values which are specific Provider IDs to retrieve.
Remarks

This cmdlet is used to retrieve Provider objects from a MAPI profile.

A provider contains specific configuration information for accessing a MAPI resource like a mailbox, public folders, address books, etc.  A provider is a child object of a MAPI profile service.

A common use of this cmdlet is to extract the PST file path from profiles that are configured with a PST service; the PST file location is part of the PST provider object of the PST service entry.

A Microsoft Exchange mailbox service will have a default provider that has core settings for the service, such as the Exchange server name and Outlook Anywhere settings.  This provider is also known as the Global Profile Section.  In Outlook 2007 and earlier, the Global Section was identified by a static Guid identifier of: c8b0db13-05aa-1a10-9bb0-00aa002fc45a.  However, starting with Outlook 2010, Microsoft changed this so that Outlook could support multiple distinct Exchange connections in a single MAPI profile.  In this case, the static Global Section guid can still be used, but will relate to the profile Service that is considered the 'Default', of which there will on be one (usually the first Exchange service added to the profile).  The 'Default' Exchange service can be determined by looking at the flags in PR_RESOURCE_FLAGS on each service for a flag of STATUS_PRIMARY_STORE. Outlook also provides a property in each configured Exchange service called PR_EMSMDB_SECTION_UID, that will contain the Global Section guid for that service.  This guid can be passed to this cmdlet in the ProviderID parameter.