exchange management shell cannot connect

Was working fine a couple days ago, now I am searching online to try to resolve this issue to no avail. I have Exchange 2013 installed and have tried to run the "Exchange Management Shell" but keep getting the following error:

VERBOSE: Connecting to exchange.server.com.
New-PSSession : [exchange.server.com] Connecting to remote server exchange.server.com failed with the following error
message : WinRM cannot process the request. The following error occurred while using Kerberos authentication: Cannot
find the computer exchange.server.com. Verify that the computer exists on the network and that the name provided is
spelled correctly. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
    + FullyQualifiedErrorId : NetworkPathNotFound,PSSessionOpenFailed
Failed to connect to an Exchange server in the current site.
Enter the server FQDN where you want to connect.:

I've searched all sorts of combinations of the above error message but nothing comes up that is relevant to the specific error message. Although changes above the FQDN is indeed exchange.server.com. This worked fine just a few days ago and now can't seem to get passed this error and I don't know where to even start. The only thing I've been able to try has been a reboot and ensure all updates are current. Of course that did not help, hence this request from the experts. By the way I am running Exchange Management Shell directly on the Exchange Server so it obviously is on the network.
Louie AlvarezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Louie AlvarezAuthor Commented:
Scott.Williamson,

Thanks for the link above but although the error applies to my situation the solution didn't. According to the instructions I should find the following on regedit:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\ExchangeServer\v14\AdminTools

On my system with Exchange 2013 I have the following:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\ExchangeServer\v15\RemotePowerShell\exchange.server.com

My system doesn't shown anything else in the ExchangeServer location. See pic:
RegEdit ExchangeServer Settings Available
0
Justin YeungSenior Systems EngineerCommented:
as far as I know if you are connecting to exchange as session, it doesn't matter if you have the shell module on your machine or not.

try the command below

$Credentials = Get-Credentail
$ExSession = New-PSSession –ConfigurationName Microsoft.Exchange –ConnectionUri ‘https://whatever.whateveryourdomain.com/PowerShell/?SerializationLevel=Full’ -Credential $Credentials –Authentication Kerberos

Open in new window

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Louie AlvarezAuthor Commented:
Justin,

I tried the commands you suggested.

#1: The command does not get recognized as a ...

[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell>$Credentials = Get-Credentail
Get-Credentail : The term 'Get-Credentail' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:16
+ $Credentials = Get-Credentail
+                ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-Credentail:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell>

#2: When prompted I of course utilized my Administrator account and got an access denied message. Now that is really odd since I used the Admin account...

[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell>$ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 'https://exchange.server.com/PowerShell/?SerializationLevel=Full' -Credential $Credentials -Authentication Kerberos New-PSSession : [exchange.lecme.com] Connecting to remote server exchange.server.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:14
+ $ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
    + FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
[PS] C:\Users\XM8Lasers\AppData\Roaming\ClassicShell>

Needless to say this still didn't allow me to access the Exchange Management Shell.
0
Justin YeungSenior Systems EngineerCommented:
Typo

Get-credential
0
Louie AlvarezAuthor Commented:
Thanks. The Get-credential worked fine. Tried the next command which I still get the same user/password error :(

PS C:\Users\EXCHANGE> New-PSSession –ConfigurationName Microsoft.Exchange –ConnectionUri ‘https://exchange.server.com/PowerShell/?SerializationLevel=Full’ -Credential $Credentials –Authentication Kerberos New-PSSession : [exchange.server.com] Connecting to remote server exchange.server.com failed with the following error message : The user name or password is incorrect. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession –ConfigurationName Microsoft.Exchange –ConnectionUri ‘https://exch ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
    + FullyQualifiedErrorId : LogonFailure,PSSessionOpenFailed
0
Justin YeungSenior Systems EngineerCommented:
The error message indicated the login credential is not accepted

Are you able to use that credential connecting to exchange shell from a workstation that has exchange management tool installed?
0
Louie AlvarezAuthor Commented:
After typing in Get-Credential I use my admin account and get the following:

[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell\Pinned>get-credential

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential

UserName                                                                                                       Password
--------                                                                                                       --------
EXCHANGE                                                                                  System.Security.SecureString

So that doesn't seem to be a problem, but when I run the 2nd command I get the access denied message. I'm doing all these attempts directly on the Exchange Server.
0
Justin YeungSenior Systems EngineerCommented:
is exchange.server.com your cas server address?

https://exchange.server.com/PowerShell/?SerializationLevel=Full’
0
Justin YeungSenior Systems EngineerCommented:
you need to convert get-credential to variable $Credential
$Credential = Get-Credential Domain\UserName

the 2nd command has $Credential specified as credential
0
Louie AlvarezAuthor Commented:
the cas server address I changed to protect the innocent :)
0
Louie AlvarezAuthor Commented:
When I enter the following command, I am prompted for password then it goes to the prompt as follows:

[PS] C:\Users\XM8Lasers\AppData\Roaming\ClassicShell\Pinned>$Credential = Get-Credential domain\user
[PS] C:\Users\XM8Lasers\AppData\Roaming\ClassicShell\Pinned>

When I enter the next command I am prompted for User & Password, then get the following (am I entering the command incorrectly?):

[PS] C:\Users\exchange\AppData\Roaming\ClassicShell\Pinned>$ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri `https://exchange.server.com/PowerShell/?SerializationLevel=Full' -Credential $Credentials -Authentication Kerberos
New-PSSession : [exchange.server.com] Connecting to remote server exchange.server.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:14
+ $ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
    + FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
[PS] C:\Users\XM8Lasers\AppData\Roaming\ClassicShell\Pinned>
0
Justin YeungSenior Systems EngineerCommented:
try this

$Credential = Get-Credential
$SessionOptions = New-PSSessionOption –SkipCACheck –SkipCNCheck –SkipRevocationCheck

$Session = New-PSSession -ConnectionUri  'https://exchange.server.com/PowerShell/?SerializationLevel=Full’ –Credential $Credential -Authentication Kerberos –SessionOption $SessionOptions
0
Justin YeungSenior Systems EngineerCommented:
I just tested it.

$Credential = Get-Credential DomainName\UserName
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  'http://FQDNServerName/PowerShell/?SerializationLevel=Full’ –Credential $Credential -Authentication Kerberos

Import-PSSession $Session  -AllowClobber -DisableNameChecking | Out-Null

need http and server name instead of Client Access URL
0
Louie AlvarezAuthor Commented:
Justin, I thank you for your patience and help wholeheartedly. Your suggestions are getting us closer, but not quite there yet. I entered the command as you instructed and no longer am I getting the denied access error, but still getting an error. This is what occurred after entering the commands:

[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell\Pinned>$Credential = Get-Credential domain\username
[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell\Pinned>New-PSSession -ConnectionUri  'http://exchange.server.com/PowerShell/?SerializationLevel=Full' -Credential $Credential -Authentication Kerberos New-PSSession : [exchange.server.com] Connecting to remote server exchange.server.com failed with the following error message : The WS-Management service cannot process the request. Cannot find the Microsoft.PowerShell session configuration in the WSMan: drive on the exchange.server.com computer. For more information, see the about_Remote_Troubleshooting Help topic.

At line:1 char:1
+ New-PSSession -ConnectionUri  'http://exchange.server.com/PowerShell/?Serializati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
   gTransportException
    + FullyQualifiedErrorId : InvalidResourceUri,PSSessionOpenFailed
[PS] C:\Users\EXCHANGE\AppData\Roaming\ClassicShell\Pinned>
0
Justin YeungSenior Systems EngineerCommented:
what if taking serialization off........ the error indicate resource URL is invalid..........you might have only enabled ssl which require https

$Credential = Get-Credential DomainName\UserName
 $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  'http://FQDNServerName/PowerShell/’ –Credential $Credential -Authentication Kerberos

 Import-PSSession $Session  -AllowClobber -DisableNameChecking | Out-Null
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Louie AlvarezAuthor Commented:
Justin,

The last command were very promising. No error messages. Here is the commands with status after a specific line is processed.

$Credential = Get-Credential domain\user (prompts me for password)
 $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  'http://exchange.server.com/PowerShell/’ –Credential $Credential -Authentication Kerberos (processes without error)

 Import-PSSession $Session  -AllowClobber -DisableNameChecking | Out-Null (presents me with a command prompt)

I think that did it. I am testing a few basic Exchange commands, such as version and it seems to be working fine.  I have a question, though, should I process the above command each time I need to get into the Exchange Management Shell in order to process the commands?
0
Justin YeungSenior Systems EngineerCommented:
yes, since you are running the shell on the connected server.
0
Louie AlvarezAuthor Commented:
Justin was very patient, gave a number of solutions, process of elimination, to get to a successful conclusion. His final command entries resolved my lack of access to Exchange Management Shell. He deserves an "Excellent" rating!
0
Justin YeungSenior Systems EngineerCommented:
Thanks Louie
0
Dougj182Commented:
I resolved this issue by fixing the time on the Exchange server.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.