Move Request Information Report

Welcome Forums General PowerShell Q&A Move Request Information Report

Viewing 1 reply thread
  • Author
    Posts
    • #188113
      Participant
      Topics: 1
      Replies: 1
      Points: -6
      Rank: Member

      I am in progress of migrating users from EX2010 to O365.  I am looking for creating a report which includes who created the migration batch.

      For example I want to insert CreatedBy into the following script:

      Get-MoveRequest -resultsize unlimited | Where-Object {$_.status -eq “Completed”} | Get-MoveRequestStatistics | select DisplayName,RemoteHost,StatusDetail, *Size, *Percent* | ft

      If I connect to the Exchange admin center > Recipients > Migration.  Under Statistics I see a Created by: field.

      I can find this information inside Get-MigrationBatch, there is a submittedbyuser field, how would I join that into the above script?

    • #188155
      Participant
      Topics: 1
      Replies: 1
      Points: -6
      Rank: Member

      Well I got it to work but its ugly

      $migrations = Get-MoveRequest -resultsize unlimited | Where-Object {$_.status -eq “Completed”}
      foreach($migration in $migrations)
      {
      $Info = $migration | Get-MoveRequestStatistics | select DisplayName, StatusDetail, TotalMailboxSize, submittedbyuser,SMTPAddress,UserPrincipalName,Batch
      $batch = $migration.BatchName.Substring($migration.BatchName.IndexOf(":")+1,$migration.BatchName.Length-$migration.BatchName.IndexOf(":")-1)
      $Info.Batch = $batch
      $Info.SubmittedByUser = (Get-MigrationBatch -Identity $batch | Select submittedbyuser).submittedbyuser
      $mbx = Get-Mailbox -Identity $migration.Alias
      $Info.SMTPAddress = $mbx.PrimarySMTPAddress
      $Info.UserPrincipalName = $mbx.UserPrincipalName
      $Info
      }

Viewing 1 reply thread
  • You must be logged in to reply to this topic.