Announcement

Collapse
No announcement yet.

Inter-org mailbox migration

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inter-org mailbox migration

    Hi all,

    I do not know if this is the correct spot here. But i want to use a powershell script along with an CSV to move my mailboxes between two forests (Consolidation).
    I am no scripting wonder myself, so found the script using google (Barath) and adjusted it to fit my needs.

    Code:
    $Source = Get-Credential
    $Target = Get-Credential 
    Import-CSV MoveMailboxes.csv | foreach {Move-Mailbox -Identity $_.Username -TargetDatabase $_.TargetDatabase -SourceForestGlobalCatalog "DC.domain.local" -GlobalCatalog "DC.domain.local" -SourceForestCredential $Source -TargetForestCredential $Target -SourceMailboxCleanupOptions MailEnableSourceAccount}
    And when i look at it, it should do what i expect from it.
    But when i launch the script , it only prompts for the credentials.
    And nothing else happens.
    The CSV contains:

    Username,"Exchangeserver\Storage Group\Mailbox database",
    Username,"Exchangeserver\VIP storage group\VIP database",
    Etc,Etc

    When i do a manual move, it works
    Code:
    Move-Mailbox -Identity Username -TargetDatabase "ExchangeServer\Storage group\Mailbox Database" -SourceForestGlobalCatalog "DC.domain.local" -GlobalCatalog "DC.domain.local" -SourceForestCredential $Source -TargetForestCredential $Target -SourceMailboxCleanupOptions MailEnableSourceAccount
    The csv is located in the same folder as the script, and the script is launched from the EMS (C:\Migration\Migmailbox.ps1). The operating system is Windows Server 2003, so there is no issue with elevation.

    What am i doing wrong?
    [Powershell]
    Start-DayDream
    Set-Location Malibu Beach
    Get-Drink
    Lay-Back
    Start-Sleep
    ....
    Wake-Up!
    Resume-Service
    Write-Warning
    [/Powershell]

    BLOG: Therealshrimp.blogspot.com
Working...
X