Enterprise Vault に PST を取り込んでいますが、失敗するものがあります。場合によっては、PST ファイルを Outlook で開き、内容を新しい PST ファイルにエクスポートして、PST ファイルを再作成する必要があります。
PowerShellでこれを行うことは可能ですか? Exchnage からではなく、既存の PST から新しい PST を作成しているため、私の知る限り、new-mailboxexportrequest は機能しません。
ティア
アンディ
Enterprise Vault に PST を取り込んでいますが、失敗するものがあります。場合によっては、PST ファイルを Outlook で開き、内容を新しい PST ファイルにエクスポートして、PST ファイルを再作成する必要があります。
PowerShellでこれを行うことは可能ですか? Exchnage からではなく、既存の PST から新しい PST を作成しているため、私の知る限り、new-mailboxexportrequest は機能しません。
ティア
アンディ
を使用しOutlook Interop (ComObject)て、Outlook をプログラムで操作し、新しい PST ファイル ストアを追加できます。
その後、古いPSTからすべてのフォルダーをコピーします。
各ステップにコメントを追加したので、それが何をしているのか理解できます...
もちろん、欠落しているアイテムについてこのプロセスの信頼性を確認するのはあなたの仕事です。
$NewPSTFilePath = "C:\PST\Backup.pst" ## add Your new PST file name path
$outlook = New-Object -ComObject outlook.application
$namespace = $Outlook.GetNameSpace("MAPI")
$OLDStore = $namespace.Stores | Select -First 1 ## get your old PST Store (select the first 1 only)
$NameSpace.AddStore($NewPSTFilePath) ## Add the new PST to the Current profile
$NEWStore = $namespace.Stores | ? {$_.filepath -eq $NewPSTFilePath} ## Get the New Store
$OLDPSTFolders = $OLDStore.GetRootFolder().Folders ## Get the list of folders from the PST
foreach ($folder in $OLDPSTFolders)
{
"Copy $($folder.name)"
[void]$folder.CopyTo($NEWStore)
}
ノート:
このスクリプトは、デフォルトの Outlook プロファイルを使用して、別のプロファイルに接続し$namespace.Logon("OtherProfileName")、$namespace = $Outlook.GetNameSpace("MAPI")