This cmdlet can either create or open a PST file and returns a Mapi.NET.Store object for the PST with which other cmdlets can be used to access its contents.
Note that PST files, when opened by a MAPI application are opened for exclusive read/write access. This means that only one application can open a PST file at a time. If a PST file is current open in Outlook, this cmdlet will fail when trying to open that PST file as the file will be locked by the Outlook application. In such a case, use New-MapiSession to open a shared session with Outlook and open the PST store from that session.
While not prevented, PST files should not be opened over a network connection (from a UNC path, for example). MAPI's communication with the PST file is not very tolerant to network drops and can corrupt a PST file. Furthermore, MAPI is very "chatty" and uses many file operations with PSTs and is not very efficient for network use. When possible, a remote PST file should be copied locally and then opened.
When this cmdlet is used to open a PST file without using an existing session, a new temporary MAPI profile is created. The profile name will start with "PowerMapi-PstProfile:" followed by some random characters to guarantee uniqueness. The profile will be deleted when the returned Store object is disposed and the underlying session is closed. However, if the script or command exits prematurely, the profile may still be listed as a profile in the list of MAPI profiles. Use the Remove-MapiProfile cmdlet to remove such profiles if necessary.
PST files can be in one of two formats: ANSI or Unicode. The older ANSI format was the original format and supported file sizes up to 2GB. The newer Unicode format supports file sizes up to approximately 30gb (with some variance depending upon data types in the store). This cmdlet, when creating new PST files, defaults to the Unicode version unless the CreateAnsiPST switch is used. Note that the Unicode version was first provided in Outlook 2003. Attempting to create a Unicode PST with versions prior to Outlook 2003 will fail and the CreateAnsiPST switch is required.
There are also some other restrictions with PST files with regards to item and attachment size as well as total folder counts. Refer to Microsoft's documentation on such limitations.