Pour pouvoir importer des données PST, vous devez utiliser la commande suivante.
New-MailboxImportRequest -Mailbox <MailboxOrMailUserIdParameter> -FilePath <LongPath> [-AcceptLargeDataLoss <SwitchParameter>] [-AssociatedMessagesCopyOption <DoNotCopy | MapByMessageClass | Copy>] [-BadItemLimit <Unlimited>] [-BatchName <String>] [-Confirm [<SwitchParameter>]] [-ConflictResolutionOption <KeepSourceItem | KeepLatestItem | KeepAll>] [-DomainController <Fqdn>] [-ExcludeDumpster <SwitchParameter>] [-ExcludeFolders <String[]>] [-IncludeFolders <String[]>] [-IsArchive <SwitchParameter>] [-MRSServer <Fqdn>] [-Name <String>] [-SourceRootFolder <String>] [-Suspend <SwitchParameter>] [-SuspendComment <String>] [-TargetRootFolder <String>] [-WhatIf [<SwitchParameter>]]
Voir lien suivant http://technet.microsoft.com/fr-fr/library/ff607310.aspx
Cependant si vous tentez de le faire vous allez rencontrer une erreur Powershell vous informant que cette commande n’existe pas voir ci-dessous
[PS] C:\Users\intranet\Desktop>New-MailboxImportRequest -Mailbox laurent.teruin -IsArchive -FilePath c:\exchangebat\Archive1.pst
The term ‘New-MailboxImportRequest’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:25
+ New-MailboxImportRequest <<<< -Mailbox laurent.teruin -IsArchive -FilePath c:\exchangebat\Archive1.pst
+ CategoryInfo : ObjectNotFound: (New-MailboxImportRequest:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Cette erreur est normale car vous devez vous donner les droits pour le faire. Rappelez-vous.. RBAC
New-ManagementRoleAssignment –Role « Mailbox Import Export » –User laurent.teruin
Vous pouvez rencontrer des erreurs d’accès comme celle-ci : Access to the path ‘\\nas\lteruin$\archive2.pst’ is denied
[PS] C:\Users\intranet\Desktop>New-MailboxImportRequest -Mailbox Laurent.teruin -IsArchive -FilePath \\nas\lteruin$\archive2.pst
Unable to open PST file ‘\\nas\lteruin$\archive2.pst’. Error details: Access to the path ‘\\nas\lteruin$\archive2.pst’ is denied.
+ CategoryInfo : NotSpecified: (0:Int32) [New-MailboxImportRequest], RemotePermanentException
+ FullyQualifiedErrorId : 6453E411,Microsoft.Exchange.Management.RecipientTasks.NewMailboxImportRequest
Si tels est le cas vérifiez que le fichier archive n’est pas en ReadOnly.
Vérifier aussi que le groupe Exchange Trusted Subsystem possède les droits de lecture écriture sur les fichiers à importer.
Une fois la commande passée vous pouvez vérifier l’avancement de la requête via la commande suivante :
[PS] C:\Users\intranet\Desktop>Get-MailboxImportRequest | fl
RunspaceId : 4c7bf36c-fedf-450e-bed4-a75ac0120eb7
FilePath : \\nas\lteruin$\archive1.pst
TargetDatabase : DBADMIN1
Mailbox : unifiedit.loc/unifiedit/informatique/equipe_informatique/laurent.teruin
Name : MailboxImport
RequestGuid : e0644429-6ed4-48c8-b937-3b4404a30ea8
RequestQueue : DBADMIN-ARC1
Flags : IntraOrg, Pull
BatchName :
Status : Completed
Protect : False
Suspend : False
Direction : Pull
RequestStyle : IntraOrg
OrganizationId :
Identity : unifiedit.loc/unifiedit/informatique/equipe_informatique/laurent.teruin\MailboxImport
IsValid : True
Cordialement
Laurent Teruin