2017-01-10 2 views
1

AzureRM VM에 연결하려고합니다. 나는 WinRM이에 대한 많은 자습서를 통해 읽었습니다하지만, 난 여전히이 작업을 얻을 수 없습니다Azure RM VM의 WinRM

Enter-PSSession -ComputerName "$($HOST).cloudapp.net" -Credential $username 

내가 이것을 실행하면, 나는 다음과 같은 오류 얻을 : 나는 -UseSSL를 추가 할 때

The user name or password is incorrect. For more information, see the about_Remote_Troubleshooting Help topic

을 param이 오류가 발생합니다 :

The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.

입력 한 자격증 명이 맞습니다. 그래서 나는 또한 "로컬 호스트 \의 $ 사용자 이름"시도 난 다른 오류가 발생합니다 :

The following error with errorcode 0x80090311 occurred while using Kerberos authentication:

그래서 내가 기본 - 인증을 사용하려고 내가 얻을 :

The WinRM client cannot process the request. Unencrypted traffic is currently disabled in the client configuration

그러나 나는 이미 확인 및 암호화되지 않은 한 트래픽이 사용됩니다.

이전에이 문제를 접한 사람이 있습니까? 다음에 무엇을 시도 할 것인가에 대한 제안? 설정이 서버에 지금 무엇을 추가

credentials = Get-Credential -UserName $username -Message "Enter Azure account credentials" 
    $continue=$false 
    Do{ 
$session = New-PSSession -ComputerName "$($VMName).cloudapp.net" -Credential $credentials 
if ($session -ne $null) 
{ 
    $continue=$true 
} 
Write-Output "Unable to create a PowerShell session . . . sleeping and trying again in 30 seconds." 
Start-Sleep -Seconds 30 
     } 
    Until(
$continue=$true) 

편집 :

그리고 클라이언트 :

WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client 

Type   Name       SourceOfValue Value 
----   ----       ------------- ----- 
System.String NetworkDelayms         5000 
System.String URLPrefix          wsman 
System.String AllowUnencrypted        true 
Container  Auth 
Container  DefaultPorts 
System.String TrustedHosts         @{Value = "XX.XX.XX.XX"} 
+0

잘 WinRM을 통해 푸른 VM을 연결하는 데 도움이, 사용자 이름 또는 암호가 잘못입니다 ... 당신이 기대하는 것을 ... – 4c74356b41

+0

나는이 약 20 시도했습니다 시간과 나는 당신을 확신합니다 ...내가 입력 한 사용자 이름과 암호는 Azure에서 VM을 설정할 때 사용한 것과 같은 것들입니다. – Jewtus

+0

더 많이 놀았으며 호스트 (예 : 호스트)와 같은 다른 오류 메시지가 있는지 몇 가지 임의의 호스트 이름을 넣었습니다. 첫 번째 명령을 사용하면 사용자 이름과 암호의 오류가 발생합니다. – Jewtus

답변

0

아마 다음과 같은 cmdlet을 사용하여 시도 할 수 있습니다. 나는 나의 실험실에서 시험한다. 그것은 나를 위해 작동합니다.

$SecureString = Read-Host -AsSecureString 'Enter your password ' | ConvertFrom-SecureString | ConvertTo-SecureString $MySecureCreds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "yourusername",$SecureString Enter-PSSession -ComputerName "yourcomputername" -Credential $MySecureCreds

난 당신과 비슷한 question는, 어쩌면 당신이 확인할 수 있습니다 찾을 수 있습니다.

업데이트 :

WinRM을 서버에서 다음 cmdlet을 실행 해보세요.

winrm quickconfig

는 다음과 같은 메시지를 받게됩니다.

WinRM service is already running on this machine. WinRM is already set up for remote management on this computer.

클라이언트 PC에서 관리자 계정을 사용하여 다음 cmdlet을 실행 해보세요. 매개 변수 아래

winrm set winrm/config/client '@{TrustedHosts = "server IP"}'

+0

나는 이것을 시도하고 나는 사용자 이름과 비밀 번호에 대한 정확한 오류 메시지를 받았다. 나는 mylocalmachine \을 usename에 추가하려고 시도했지만 암호화되지 않은 트래픽 오류가 발생합니다. 그래서 기본적으로 나는 똑같은 오류를 얻었습니다 ... 또한 보안 문자열로 변환하는 것만으로 보안 문자열을 변환하여 파이프로 변환하는 이유는 무엇입니까? – Jewtus

+0

@Jewtus 제 대답을 업데이트했습니다. 서비스와 클라이언트에서'WinRM'을 설정하려고 할 수 있습니다. –

+0

이미 컴퓨터에서이 작업을 수행했지만 설정을 포함 시켰습니다. AD없이 컴퓨터에 WinRM을 사용하려는 경우 SSL 인증서를 설정하고 구성해야한다는 내용을 읽었습니다. 문제가 있거나 방화벽 구성 문제 일 수 있습니까? 다시 Azure RM 호스트에 대해이 작업을 수행하려고합니다. – Jewtus

0

$hostName="DomainName" 
$winrmPort = "5986" 
# Get the credentials of the machine 
$cred = Get-Credential 
# Connect to the machine 
$soptions = New-PSSessionOption -SkipCACheck 
Enter-PSSession -ComputerName $hostName -Port $winrmPort -Credential $cred -SessionOption $soptions -UseSSL 
+0

스크립트 연결 WIRM : $ 여기서 hostName = "도메인 이름" $ winrmPort = "5986" $ 사용자 이름 = "사용자 이름" $ secpasswd =를 ConvertTo-SecureString "암호"-AsPlainText -Force $ mycreds = 새-개체 System.Management .오토메이션.PSCredential ("$ username", $ secpasswd) $ soptions = New-PSSessionOption -SkipCACheck Enter-PSSession -ComputerName $ hostName -Port $ winrmPort -Credential $ mycreds -SessionOption $ soptions -UseSSL – vinoth

관련 문제