When I try to deploy new Exchange 2013 SP1 on my lab failed, because i have before Exchange Server and i uninstall it with all files from Active Directory.
Error: The following error was generated when “$error.Clear();
if ($RoleIsDatacenter -ne $true -and $RoleIsDatacenterDedicated -ne $true)
This issue is as below screen Shot
To resolve this issue, you need to follow below steps:
- In AD Users and Computers, delete all those old Exchange mailbox type system accounts (Exchange Online-ApplicationAccount, Federatedemail, DiscoverySearchMailbox, HealthMailbox, Migration, SystemMailbox). In my case, i find migration account under users OU so i deleted it.
- Then rerun step again, it should be run successfully.