使用 PowerShell 更改 Outlook 默认 PST

Change Outlook Default PST using PowerShell

我想使用 PowerShell 执行以下操作。

  1. 创建一个新的 PST 文件“Data1.PST”

  2. 将文件“Data1.PST”标记为默认文件。

  3. 删除原来的默认PST文件。

不在 PS 或单独的 Outlook 对象模型中 - 您需要使用扩展 MAPI(C++ 或 Delphi)或 Redemption (any language, I am its author) or ProfMan(Redemption 的可分发版本附带)。

赎回 - 如果您已经在处理活动的 Outlook 会话。使用 RDOSession.Stores.DefaultStore to open the default store. Use RDOPstStore.PstPath to figure out the path to the PST file. To add a new PST store, use RDOSession.Stores.AddPstStore. You can then change the RDOStore.Default 属性 为 true.

ProfMan(如果您想在不实际登录的情况下操作现有配置文件)- 请参阅 https://www.dimastr.com/redemption/profman_examples.htm#example4 中的示例。 -