Quantcast
Channel: Exchange Previous Versions - Setup, Deployment, Updates, and Migration forum
Viewing all articles
Browse latest Browse all 1246

Sync-MailPublicFolders.ps1 Running with errors

$
0
0

We are in the middle of a staged migration of our Hybrid Exchange 2007 to Office 365 environment.

Azure A/D sync is working, as is SSO, and several mailboxes have been migrated and mail flow between online and onsite is working fine (finally).

I am following Microsoft's supported method for making onsite mail-enabled Public Folders available to migrated users (TechNet Article DN249373) and am at Step 4 in the process. All prerequisites have been met, however when the script is run we get the following output:

[PS] C:\VFScripts\PFScripts>./Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -WhatIf -CsvSummaryFile:sync_summary.csv

New-Object : Cannot find type [System.Collections.Generic.HashSet[Guid]]: make sure the assembly containing this type is loaded.
At C:\VFScripts\PFScripts\Sync-MailPublicFolders.ps1:469 char:46
+ $script:mailEnabledSystemFolders = New-Object <<<< 'System.Collections.Generic.HashSet[Guid]';
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

Confirm
Are you sure you want to perform this action?
Performing operation "Remove File" on Target
"C:\VFScripts\PFScripts\sync_summary.csv".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):y
[5/17/2016 9:29:40 AM] Creating an Exchange Online remote session...
[5/17/2016 9:29:52 AM] Exchange Online remote session created successfully.
[5/17/2016 9:29:52 AM] Enumerating local mail enabled public folders...
[5/17/2016 9:29:53 AM] Mail public folders enumeration completed: 62 local folde
r(s) found.
[5/17/2016 9:29:53 AM] Enumerating Exchange Online mail enabled public folders..
.
[5/17/2016 9:29:54 AM] Mail public folders enumeration completed: 0 Exchange Online folder(s) found.
You cannot call a method on a null-valued expression.
At C:\VFScripts\PFScripts\Sync-MailPublicFolders.ps1:598 char:59
+ if (-not $script:mailEnabledSystemFolders.Contains <<<< ($local.Guid)
)
+ CategoryInfo : InvalidOperation: (Contains:String) [], RuntimeE
xception
+ FullyQualifiedErrorId : InvokeMethodOnNull

[PS] C:\VFScripts\PFScripts>

The sync_summary.csv is created but only contains the headers and no data. 

I have updated to Update Rollup 18 for Exchange Server 2007 Service Pack 3 (KB3078672) to ensure all the correct libraries are available. I don't know why the script can't seem to find the assembly it needs. Windows PowerShell 2.0 and WinRM 2.0 for Windows Server 2008 x64 Edition (KB968930) is installed, and the account running the command is in the local admins groups as well as the required 2007 and O365 roles.

This is the last piece of our migration puzzle that I need to resolve ASAP before I can migrate any further users.

I also need to figure out how to get it to not prompt to create/overwrite the sync_summary.csv file as I am automating this process to run daily and can't have it waiting for input. Microsoft recommends scheduling this to run at least daily but doesn't provide a script that can run unattended.

I have an open support ticket with Microsoft but their support engineer keeps trying to steer me to other unsupported solutions for our environment, and won't support this solution. Frustration level is very high.

Thank you for any assistance you can offer.


Viewing all articles
Browse latest Browse all 1246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>