How to fix EMC and Exchange Management Shell after reinstall of PowerShell?
Hi, I am unable to launch the Exchange Management Shell nor Exchange Management Console. I beleive this may be related to a recent removal and reinstall of windows PowerShell.
Is there a command I can run to try and resolve this issue?
EMC produces the following error message:
The type initializer for 'Microsoft.Exchange.Configuration.MonadDataProvider.ConnectionPool' threw an exception.
at Microsoft.Exchange.Configuration.MonadDataProvider.ConnectionPool.GetPooledRunspace(Int32 timeout, MonadConnection connection)
at Microsoft.Exchange.Configuration.MonadDataProvider.MonadConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Microsoft.Exchange.Management.SnapIn.Esm.OrganizationConfiguration.Mailbox.AddressListLoader.FillAddressBookBaseTable(RefreshRequestEventArgs e)
at Microsoft.Exchange.Management.SnapIn.Esm.OrganizationConfiguration.Mailbox.AddressListLoader.OnFillTable(RefreshRequestEventArgs e)
at Microsoft.Exchange.Management.SystemManager.DataTableLoader.Fill(RefreshRequestEventArgs e)
at Microsoft.Exchange.Management.SystemManager.DataTableLoader.OnDoRefreshWork(RefreshRequestEventArgs e)
at Microsoft.Exchange.Management.SystemManager.RefreshableComponent.worker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
No Windows PowerShell Snap-ins are available for version 1.
at System.Management.Automation.PSSnapInReader.GetMshSnapinRootKey(RegistryKey versionRootKey, String psVersion)
at System.Management.Automation.PSSnapInReader.Read(String psVersion, String mshsnapinId)
at System.Management.Automation.Runspaces.MshConsoleInfo.AddPSSnapIn(String mshSnapInID)
at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.DoAddPSSnapIn(String name, PSSnapInException& warning)
at Microsoft.Exchange.Configuration.MonadDataProvider.MonadRunspaceConfiguration.AddPSSnapIn(RunspaceConfiguration runspaceConfiguration, String mshSnapInName)
at Microsoft.Exchange.Configuration.MonadDataProvider.MonadRunspaceConfiguration.Create()
at Microsoft.Exchange.Configuration.MonadDataProvider.ConnectionPool..cctor()
June 22nd, 2009 7:13pm
Have you tried to reinstall or repairthe EMC/EMS tools from the Exchange installation CD?HOnestly I've never seen this one.SF - MCITP:EMA, MCTS
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2009 9:19pm
Hi,
Please try to check if you have ApplicationBase key in registry.
HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\PowerShellEngine
If no, then please add the ApllicationBase key.
Besides, please ensure that you have Windows Server 2003 Administration Tools Pack correctly installed.
If the problem still persists,then please try to re-install the Exchange management tools.
Regards,
Xiu
June 23rd, 2009 12:01pm
thanks for the suggestion. How do I reinstall EMC/EMS from the installation media? When I run setup, the Management Tools check box is grayed out.Thanks!-sul.
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2009 4:08pm
Hi Xiu,thank you for your suggestions. I have checked the registry key and it exists as follows:ApplicationBase REG_SZ C:\WINDOWS\system32\WindowsPowerShell\v1.0The 2003 Admin Tools Pack is also installed properly on the server.How do I reinstall Exchange management tools? I ran 'setup' and the check box next to Exchange Management Tools is grayed out.Thanks!
June 23rd, 2009 4:12pm
did you try that?go to C:\Program Files\Microsoft\Exchange Server\BinrunSetup.com /mode:uninstall /roles:MTMT= management toolsMCSE,CCNA,VCP,APP
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2009 4:36pm
Hi Ismail,Thank you for your suggestion, however this does not seem towork. The command results in the following error message:
D:\Program Files\Microsoft\Exchange Server\Bin>Setup.com /mode:uninstall /roles:MT
Welcome to Microsoft Exchange Server 2007 Unattended Setup
Preparing Exchange Setup
The following server roles will be removed
Some roles are still installed. Management Tools cannot be uninstalled.
Please specify an existing server role(s) to uninstall.
Exchange Server setup encountered an error.
Any suggestions?Thanks!-sul.
June 23rd, 2009 5:23pm
How many exchange servers in your org?Have you tried to install the mgmt tools to a client machine?Last resort woudl be to do a recoverserver....that will reinstall everything though.SF - MCITP:EMA, MCTS
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2009 5:29pm
did you check event viewer for error messages?MCSE,CCNA,VCP,APP
June 23rd, 2009 5:30pm
just this one server. i am able to use emc from a client machine with no problems buti need to be able to run EMC and shellon the server itsel.with recoverserver soundsiam afraid tolosecertainsettings or cause some unwanted problems to happen. still hoping there is a simpler solution out there before
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2009 7:00pm
the event viewer has no error messages... only informational messages.
June 23rd, 2009 8:05pm
Hi,
Please try to re-install Windows Powershell 1.0 and then check the issue again.
Windows PowerShell 1.0 for Windows Server 2003, x64-based versionsCollapse this imageExpand this image
Download the Windows PowerShell 1.0 Windows Server 2003-x64 localized package now.
FYI: Error "No Windows PowerShell Snap-ins are available for version 1" When Loading Exchange Powershell Snap-in
http://blogs.msdn.com/mstehle/archive/2007/01/24/kb-preview-error-no-windows-powershell-snap-ins-when-loading-exchange-powershell-snap-in.aspx
Regards,
Xiu
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2009 6:34am
Hi,Sul.I also have the trouble that issimilarwith yours,unable to launch the EMC and EMS.This morning I learnt this post,and follow the operation specified by Xiu Zhang,just reinstall the POWERSHELL,then I canlaunch the EMC and EMS normally again.Thanks!
June 25th, 2009 5:22am
Hi Xiu,thank you for your suggestion.I first downloaded the PowerShell 1.0 installer using your link above and I ran it. I got an error message saying that Windows PowerShell cannot install this version of the product and that I must remove any earlier version.I went to Add/Remove programs and removed the installed version which was named as Hotfix for Windows Server 2003 (KB926139-v2). I received a message saying that Windows PowerShell(TM) 1.0 has been successfully removed.I then successfully installed PowerShell for Windows Server 2003-x64 and tried to run EMC and the Exchange Shell, and I received the same error message again as stated in my first post.Is there anything else I can try other than running setup in recoverserver mode?Thank you again for your help,-sul.
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2009 4:18pm
Hi,After you have installed Powershell v1.0 64-bit,please reboot the machine and then re-install Exchange Management Tools.Besides,please check the registry again.Regards,Xiu
June 26th, 2009 5:20am
Hi Xiu,
I did a reboot of the machine, but I am not sure how to re-install Exchange Management Tools. Is there a command for reinstall?
The command that I am familiar with is only for uninstall:
Setup.com /mode:uninstall /roles:MT
Which results in the following:
Welcome to Microsoft Exchange Server 2007 Unattended Setup
Preparing Exchange Setup
The following server roles will be removed
Some roles are still installed. Management Tools cannot be uninstalled.
Please specify an existing server role(s) to uninstall.
Exchange Server setup encountered an error.
Any Suggestions?
Thanks!
-sul.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2009 5:23am
Hi,Sorry for the late response.From my local test,I found that we may need to clear all the exchange server roles and then untick management tools.Thus we need to re-install all the exchange Server roles with Exchange management tools.Regards,Xiu
July 10th, 2009 12:04pm
Hi Xiu,
thank you for the response. Is this procedure as simple as removing the roles and reinstalling them and everything automatically resolves itself without any extensive work such as rebuilding mailboxes, resources, antispam settings, etc, etc.?Or is this a major step? If so, I want to be very careful. I am wondering if there is step-by-step guidance available on how to do what you are suggesting by making sure that I prevent any loss of data and/or configurations settings.
Again, many thanks for your generous help in this matter.
-sul.
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2009 4:59pm