none
Migration to Office365, New-MigrationEndPoint, -PublicFolder not accepted as a parameter RRS feed

  • Question

  • I am in the process of moving our existing Exchange Server 2007 to Office 365, and all User Mailboxes have been moved. So I've started moving the Public Folders.

    I have been using this guide Use batch migration to migrate legacy public folders to Office 365 and Exchange Online, and have gone through all steps up until Step 5: Start the migration request. Where I get an error.

    Here is what I do:

    • At the beginning of Step 5 and in the Exchange Management Shell (Powershell) - I start a connection to Online Exchange as described in Connect to Exchange Online using remote PowerShell.
    • I then perfom Step 1 and Step 2, but in step 3 of connecting to Exchange Online, when connecting using Import-PSSession $Session I get a Warning regarding commands already present.

      So I instead execute the command as Import-PSSession $Session -AllowClobber to allow shadowing of local commands, this is the result from that command:
    [PS] C:\PFScripts>Import-PSSession $Session -AllowClobber
    WARNING: Some imported command names include unapproved verbs which might make them less discoverable.  
    Use the Verbose parameter for more detail or type Get-Verb to see the list of approved verbs. ModuleType Name ExportedCommands ---------- ---- ---------------- Script tmp_fcd17c22-5236-489c... {Get-HostedOutboundSpamFilterPolicy, Get-IRMConfiguration, New-MailUser,...

    Then I continue on the batch migration page, where I do as follows:

    • Step 5.1, Execute command:
    .\Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile:sync_summary.csv
    • Which gives me a Windows PowerShell Credential Request window. I authenticate myself with my Office365 username and password.

      I have also tried executing this script on my own Desktop, but script must be run on an Exchange 2007 server.
    • Step 5.2.a - 5.2.c, get LegacyExchangeDN of the administrative account and the mailbox server, and the FQDN for the server.
    • Step 5.3.a, set source credentials using:
    $Source_Credential = Get-Credential <source_domain\PublicFolder_Administrator_Account>
    • Again a Windows PowerShell Credential Request window opens, and I authenticate myself with an account on our local AD that has access to the Exchange 2007 server
    • Step 5.3.b, set RemoteMailboxLegacyDN:
    $Source_RemoteMailboxLegacyDN = "/o=<Company Name>/ou=First Administrative Group/cn=Recipients/cn=<administrative user>"
    • Step 5.3.c, set RemoteFolderDN:
    $Source_RemotePublicFolderServerLegacyDN = "/o=<Company Name>/ou=Exchange Administrative Group (QY12PAHF23SPKLT)/cn=Configuration/cn=Servers/cn=<Server Name>"
    • Step 5.3.d, set OWA remote host:
    $Source_OutlookAnywhereExternalHostName = "<FQDN Accessible Remotely>"

    Now the variables needed for the next command has been set, and this is where the error occur. I run the following command:

    $PfEndpoint = New-MigrationEndpoint -PublicFolder -Name PublicFolderEndpoint -RPCProxyServer $Source_OutlookAnywhereExternalHostName -Credentials $Source_Credential -SourceMailboxLegacyDN $Source_RemoteMailboxLegacyDN -PublicFolderDatabaseServerLegacyDN $Source_RemotePublicFolderServerLegacyDN -Authentication Basic

    And then I get the following error:

    A positional parameter cannot be found that accepts argument '-PublicFolder'.
        + CategoryInfo          : InvalidArgument: (:) [New-MigrationEndpoint], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,New-MigrationEndpoint

    I have checked that the Required mailboxes have been created using Get-Mailbox -PublicFolder, here is the result:

    Name                      Alias                ServerName       ProhibitSendQuota
    ----                      -----                ----------       -----------------
    Mailbox1                  Mailbox1             ok2pr89mb2721    49.5 GB (53,150,220,288 bytes)
    Mailbox10                 Mailbox10            vi1pr89mb2800    49.5 GB (53,150,220,288 bytes)
    Mailbox11                 Mailbox11            ok3pr89mb1202    49.5 GB (53,150,220,288 bytes)
    Mailbox12                 Mailbox12            vi3pr89mb2411    49.5 GB (53,150,220,288 bytes)
    Mailbox13                 Mailbox13            ok3pr89mb180     49.5 GB (53,150,220,288 bytes)
    Mailbox14                 Mailbox14            vi4pr89mb2368    49.5 GB (53,150,220,288 bytes)
    Mailbox15                 Mailbox15            ok2pr89mb2372    49.5 GB (53,150,220,288 bytes)
    Mailbox16                 Mailbox16            ok3pr89mb219     49.5 GB (53,150,220,288 bytes)
    Mailbox17                 Mailbox17            vi5pr89mb2725    49.5 GB (53,150,220,288 bytes)
    Mailbox18                 Mailbox18            vi1pr89mb1054    49.5 GB (53,150,220,288 bytes)
    Mailbox19                 Mailbox19            ok3pr89mb2407    49.5 GB (53,150,220,288 bytes)
    Mailbox2                  Mailbox2             vi4pr89mb2367    49.5 GB (53,150,220,288 bytes)
    Mailbox3                  Mailbox3             ok2pr89mb2722    49.5 GB (53,150,220,288 bytes)
    Mailbox4                  Mailbox4             he1pr89mb2843    49.5 GB (53,150,220,288 bytes)
    Mailbox5                  Mailbox5             vi5pr89mb2727    49.5 GB (53,150,220,288 bytes)
    Mailbox6                  Mailbox6             ok3pr89mb1090    49.5 GB (53,150,220,288 bytes)
    Mailbox7                  Mailbox7             okspr89mb270     49.5 GB (53,150,220,288 bytes)
    Mailbox8                  Mailbox8             ok3pr89mb265     49.5 GB (53,150,220,288 bytes)
    Mailbox9                  Mailbox9             vi5pr89mb1224    49.5 GB (53,150,220,288 bytes)

    Please help, I would really hate to export my Public Folders as PST and then re-importing them to our Office 365 (and its not recommended by Mirosoft).


    Michael Nielsen


    Friday, June 19, 2015 9:46 AM

Answers

  • In Exchange Online PowerShell, enter:

    New-MigrationEndpoint -Public

    and then press Tab.  If the parameter tab-completes, you should be okay.  If it doesn't you probably have a rights problem, i.e., your account doesn't have the rights to use that parameter.  Make sure the account you're using has the correct rights in Exchange Online and open a new Exchange Online PowerShell session.



    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    Friday, June 19, 2015 7:41 PM
    Moderator

All replies

  • In Exchange Online PowerShell, enter:

    New-MigrationEndpoint -Public

    and then press Tab.  If the parameter tab-completes, you should be okay.  If it doesn't you probably have a rights problem, i.e., your account doesn't have the rights to use that parameter.  Make sure the account you're using has the correct rights in Exchange Online and open a new Exchange Online PowerShell session.



    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    Friday, June 19, 2015 7:41 PM
    Moderator
  • Thank you Ed, that was it.

    I created a new Role under Exchange Admin Center, Permissions called Migration Management - Assigned all roles (since I did not know which role to add - Migration alone was not enough), and then it worked, and added my account as a member.

    Then when the migration has completed, I'll remove the Migration role.


    Michael Nielsen

    Saturday, June 20, 2015 12:45 AM