После удаления Exchange Management Tools 2010 и установки Exchange Management Tools 2016 консоль Exchange Management Shell запускается, но командлеты Exchange недоступны. При подключении появляется warning:
VERBOSE: Connecting to exchange.server.local. WARNING: Can't generate Export-Module for the current session using Import-PSSession. VERBOSE: Connected to exchange.server.local.
Что помогло
Помогло выполнение в консоли Exchange Management Tools 2016.
Connect-ExchangeServer -Auto -ClearCache
Дополнительные Рекомендации
На случай если не помогло.
https://social.technet.microsoft.com/Forums/ie/en-US/025f9307-0bec-4248-933d-e7a01cd22785/how-do-i-get-rid-of-the-quotcant-generate-exportmodule-for-the-current-session-using?forum=exchange2010
Workaround solution
Delete all under %userprofile%\AppData\Roaming\Microsoft\Exchange\RemotePowerShell\
Log off/Log on
in Elevated cmd: iisreset
Wait 1 min.
In Elevated CommandPromt type:
C:\Windows\system32>powershell -version 2
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Windows\system32>
6. After that in the same window run
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1
Connect-ExchangeServer -Auto
7. You will get a lot of errors and you'll be asked once to type the server FQDN, Type it.
Easy find your server FQDN in PS:
$env:COMPUTERNAME+'.'+$env:USERDNSDOMAIN
or
(Get-WmiObject win32_computersystem).DNSHostName+"."+(Get-WmiObject win32_computersystem).Domain
8. In Elevated Windows Powershell
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1
Connect-ExchangeServer -Auto -ClearCache
And now you can start EMS, that should work.
I do not know why, but it helped me twice.
Discussion