Cannot Create Remote PowerShell Session After Enable-PSRemoting

I can’t retire to any car to save my life! I tried everything I could find. If anyone could fix the problem or direct me, I would appreciate it as it would be a great tool to add to my domain.

SETUP:

  • Client machine inside the domain
  • Server machine inside or outside the domain - virtualized and used for WSUS Computername: wsustest
  • CLIENT SERVER MACHINE physical name: epizzi-pc

STEPS:

  enable-pssremoting done!  on all machines
 trustedhosts configured with * or client machine added
 Firewalls with public profile off just in case

 Enter-PSSession -ComputerName wsustest -Credential wsustest \ administrator Enter-PSSession -ComputerName epizzi-pc -Credential epizzi-pc \ administrador Enter-PSSession: Connecting to remote server epizzi-pc failed with the following error message: WinRM cannot process the request.  The following error with errorcode 0x80090311 occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request.  Possible causes are: -The user name or password specified are invalid.  -Kerberos is used when no authentication method and no user name are specified.  -Kerberos accepts domain user names, but not local user names.  -The Service Principal Name (SPN) for the remote computer name and port does not exist.  -The client and remote computers are in different domains and there is no trust between the two domains.  After checking for the above issues, try the following: -Check the Event Viewer for events related to authentication.  -Change the authentication method;  add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.  Note that computers in the TrustedHosts list might not be authenticated.  -For more information about WinRM configuration, run the following command: winrm help config.  For more information, see the about_Remote_Troubleshooting Help topic.  At line: 1 char: 1 + Enter-PSSession -ComputerName epizzi-pc -Credential epizzi-pc \ administrador + ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: InvalidArgument: (epizzi-pc: String) [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId: CreateRemoteRunspaceFailed 

  Enter-PSSession -ComputerName wsustest -UseSSL -Credential wsustest \ administrator

 * Enter-PSSession: Connecting to remote server wsustest failed with the following error message: WinRM cannot complete the operation.  Verify that the specified computer name is 
 valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer.  By default, the WinRM 
 firewall exception for public profiles limits access to remote computers within the same local subnet.  For more information, see the about_Remote_Troubleshooting Help topic.
 At line: 1 char: 1
 + Enter-PSSession -ComputerName wsustest -UseSSL -Credential wsustest \ administrato ...
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo: InvalidArgument: (wsustest: String) [Enter-PSSession], PSRemotingTransportException
     + FullyQualifiedErrorId: CreateRemoteRunspaceFailed *
 ERRORs:
+15
source share
7 answers

I got the same problem when interacting remotely with the server and found this post very useful - http://jeffgraves.me/2013/10/14/powershell-remoting/

For my specific case, I did the following:

By local machine

  1. winrm quickconfig (although this has already been configured)
  2. winrm s winrm / config / client '@ {TrustedHosts = "myservername.domain"}'

By remote machine

  1. enable-psremoting -force
  2. Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Microsoft.PowerShell -force Name
+10
source

This is how I do it. I use this in my scripts.

# This is only done once Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File c:\Windows\temp\securepass.txt # Setup credentials $SecureString = Get-Content c:\Windows\temp\securepass.txt | ConvertTo-SecureString $mycredentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "yourDomain\userID",$SecureString # Open remote session: $MyRSession = New-PSSession -ComputerName Computer1 -Credential $mycredentials -Authentication default # Use remote session: Enter-PSSession $MyRSession 
+3
source

If there is no trust between the client and server computers, you need to enable basic server-side authentication. Do this by switching the correct properties on the WSMAN: drive on the server. Obviously, you will have to do this interactively on the console or through the remote desktop due to a problem with the chicken and the egg :) In addition, this may also come into play:

http://www.nivot.org/blog/post/2009/10/30/PowerShell20EnablingRemotingWithVirtualXPModeOnWindows7

+1
source

I am having a problem using full login. Instead of "netbiosdomain \ accountname" I used the name fqdn \ accountname, as in Microsoft.com \ myaccount at the get-credential prompt. It may not work for everyone, but it's worth it.

+1
source

Get -UseSSL of -UseSSL . I turned on PSRemoting and had problems with this. I think I could look at this later, but so far it does not matter.

0
source

I reached a remote session with the Enter-pssession command, had to follow these exact parameters

 $creds = get-credential (the -credential parameter in enter-pssession does not work properly, thus u must previously enter the object at another variable) Enter-pssession -computername wsustest -authentication Default -credentials $creds 

I also had to install both the client and the remote server in wsman trusted hosts: space

another solution that would surely work, but I havent tried installing https: it's harder to do.

thanks for everyone, your comments certainly led to a solution!

0
source

I was getting the same error currently no logon servers available . The problem was resolved by using UPN or Username@Domain as the credentials instead of Domain\Username .

0
source

All Articles