Hi all,
I have a softdeleted mailbox guid
$oldguid=(Get-Mailbox -SoftDeletedMailbox -Identity test.migration@mydomaincom.mail.onmicrosoft.com).Guid
echo $oldguid
Guid
----
85dc9b16-0100-48f4-81f5-546ac0e71cba
I have new mailbox account guid
2c765720-409f-4745-b11c-8602bbef5e49
When I try to reconnect softdeleted mailbox to new account
New-MailboxRestoreRequest -SourceMailbox $oldguid -TargetMailbox $newguid -AllowLegacyDNMismatch
Cannot process argument transformation on parameter 'SourceMailbox'. Cannot convert the "85dc9b16-0100-48f4-81f5-546ac0e71cba" value of type "System.Guid" to type
"Microsoft.Exchange.Configuration.Tasks.MailboxLocationIdParameter".
+ CategoryInfo : InvalidData: (:) [New-MailboxRestoreRequest], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,New-MailboxRestoreRequest
+ PSComputerName : outlook.office365.com
This command works fine
New-MailboxRestoreRequest -SourceMailbox "85dc9b16-0100-48f4-81f5-546ac0e71cba" -TargetMailbox "2c765720-409f-4745-b11c-8602bbef5e49" -AllowLegacyDNMismatch
How can I get mailbox guid and convert its value to string ?
Please give me some advice , thank you very much.