2013-04-17 57 views
7

Nie mogę zdalnie przeprowadzić żadnej maszyny, aby uratować mi życie! Próbowałem wszystkiego, co mogę znaleźć. Jeśli ktokolwiek mógłby mnie rozwiązać lub poprowadzić, byłbym wdzięczny, ponieważ byłoby to świetne narzędzie do dodawania w mojej domenie.Nie można utworzyć sesji zdalnej powłoki po włączeniu opcji Enable-PSRemoting

SETUP: ekspres

  1. Client wewnątrz domeny
  2. Server maszyna wewnątrz lub poza domeną - Wirtualizacja i wykorzystywane dla WSUS nazwa_komputera wsustest
  3. Client Server MASZYNA fizyko nazwa_komputera epizzi-pc

KROKI:

 
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: 
+0

Czy jesteś w stanie telnetować do portu '5985' na kliencie? – MDMoore313

Odpowiedz

0

Pozbądź -UseSSL. Włączyłem funkcję PSRemoting i miałem problemy z jej użyciem. Chyba mogłem na to popatrzeć później, ale na razie to nie ma znaczenia.

+0

Próbowałem z useSSL, nadal mam błąd – user1056661

1

Jeśli nie ma zaufania między komputerem klienckim a serwerem, należy włączyć uwierzytelnianie podstawowe po stronie serwera. Wykonaj to, przełączając właściwe właściwości w WSMAN: napęd na serwerze. Będziesz oczywiście musiał to zrobić interaktywnie na konsoli lub poprzez zdalny pulpit, ze względu na problem z kurczaka i jaj :) Poza tym, ten może wchodzić w grę także:

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

+0

dobrze dodałem go do domeny, z tym wyjątkiem, że nie mam konta administratora. więc próbowałem używać lokalnych kont administratora, spróbuję użyć sugestii: – user1056661

0

udało mi się osiągnąć sesji zdalnej z poleceniem Enter PSSession, miał do tych dokładnych parametrów

$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 

miałem też ustawić zarówno klienta, jak i serwera zdalnego w zaufanych hostów wsman: przestrzeń

inne rozwiązanie, które z pewnością wouldve pracował ale ha vent próbował, ustawiłby https: co jest trudniejsze do zrobienia.

thx dla wszystkich, twoje komentarze z pewnością doprowadziły do ​​rozwiązania!

2

Tak to robię. Używam tego w moich skryptach.

# 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 
2

ja otrzymywał ten sam problem gdy remoting na serwerze i znalazłem ten wpis na blogu bardzo pomocne - http://jeffgraves.me/2013/10/14/powershell-remoting/

Na moim konkretnym przypadku zrobiłem następujące:

Na komputerze lokalnym

  1. winrm quickconfig (chociaż zostało już skonfigurowane)
  2. winrm s winrm/config/cli ent '@ {TrustedHosts = "mójserwer.Domena "}”

na zdalnej maszynie

  1. enable-psremoting -force
  2. Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell -Force
+0

Czy "myservername.domain" odnosi się do zdalnego komputera w tym przypadku? –

+0

To prawda, jak wspomniano w poście Jeffa Graves'a "... będziesz musiał dodać zdalny system do listy TrustedHosts w systemie klienta" – IsolatedStorage

0

Mam wokół tego Problem polegał na używaniu w pełni kwalifikowanego logowania, zamiast "netbiosdomain \ accountname" użyłem fqdn \ accountname, jak w Microsoft.com \ myaccount w zachęcie do uzyskania danych logowania. Może nie działać dla wszystkich, ale warto spróbować.

Powiązane problemy