Fix for Enabling Online Archive in Office 365 Hybrid Deployment | Quisitive

So I blogged a little while ago about an issue with enabling Online Archive for a Migrated user in Office 365 Hybrid Deployment So I came up with a work around to fix this:

Login to Domain Controller (assumes 2008 R2 version) if not you will need to use ADSIEDIT.MSC

Open Active Directory Users and Computers

Browse to the user account you want to have enabled for Online Archive

Open the Account properties and choose the Attribute Editor tab (if this does not show up select the View menu from ADUC and ensure Advanced Features in selected)

Locate the MSExchangeVersion Attribute

Replace the value with 44220983382016

Login to Hybrid Exchange 2010 SP2 server

Launch the Exchange Management Shell (EMS)

Run the following command, replacing USERNAME with the user’s login name

Enable-RemoteMailbox USERNAME-Archive

Force a DirSync

This has worked well for me and I have not run into any issues with manually setting the MSExchangeVersion Attribute.

In a previous post I covered importing a VM using PowerShell. In this post I am going to cover what to do if the import fails due to a compatibility issue.

In this example I am attempting to import a VM from the export ExportTest. To make things easier to read, I have set to the path the export XML file to the variable $Source.

PS C:>$Source = ‘E:ExportsExportTestVirtual Machines�FD602AC-2044-4A06-A0C3-019F70F21458.XML’

Next, I run the command to import the VM.

PS C:>Import-VM -Path $Source

The import fails with the message:

Import-VM : Unable to import virtual machine due to configuration errors. Please use Compare-VM to repair the virtual machine.
At line:1 char:1
+ Import-VM -Path $Source
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-VM], VirtualizationOperationFailedException
+ FullyQualifiedErrorId : Microsoft.HyperV.PowerShell.Commands.ImportVMCommand

As you can see from the error message above, the import failed due to a configuration error. We now need to determine the cause of the configuration error and resolve it. To do this we will use the Compare-VM Cmdlet.

Run the command below to generate a report that lists the VM’s incompatibilities with the host.

PS C:>$report = Compare-VM -Path $Source

Next, we need to display compatibility report.

PS C:>$report.Incompatibilities | Format-Table -AutoSize

Results:

Message
——-
Could not find Ethernet switch ‘TestSwitch’.
MessageId
——-
33012
Source
——-
Microsoft.HyperV.PowerShell.VMNetworkAdapter

This shows that the switch TestSwitch is assigned to the exported VM, but is not present on the host.

To resolve this we can disconnect the network adapter.

PS C:>$report.Incompatibilities[0].Source | Disconnect-VMNetworkAdapter

Next, we can regenerate the compatibility report to determine if there are any other issues.

PS C:>Compare-VM –CompatibilityReport $report

Results:

VM : Microsoft.HyperV.PowerShell.VirtualMachine
OperationType : ImportVirtualMachine
Destination : HOSTSERVER
Path : E:ExportsExportTestVirtual Machines�FD602AC-2044-4A06-A0C3-019F70F21458.XML
SnapshotPath : E:ExportsExportTestSnapshots
VhdDestinationPath :
VhdSourcePath :
Incompatibilities :

The results show that there are no incompatibilities, so we can now import the VM.

PS C:>import-vm -CompatibilityReport $report

One thing to make note of is, you cannot use the –Copy parameter with the –CompatibilityReport parameter. This means that when you use this method, the VM will be imported from the path listed in the report, and a new ID will not be generated. If you need to create additional VM’s from this template, you will need to export again from the VM it created.