새로운 2016 코어 서버에 문제가 있습니다. (최근 2012r2에서 서버를 마이그레이션했습니다)
이전 2012r2 서버에서는 원격 ps 세션(enter-pssession oldservername)을 통해 powershell 스크립트를 실행할 수 있었습니다. 이제 새 서버에서 오류가 발생합니다.
이 스크립트는 AD 모듈(get-aduser, get-adgroup 등)의 명령을 사용합니다.
원격 세션을 통해 실행하면 다음과 같은 일이 발생합니다.
PS C:\> enter-pssession newserver
[newserver]: PS C:\> get-aduser username
Unable to contact the server. This may be because this server does not exist,
it is currently down, or it does not have the Active Directory Web Services running.
+ CategoryInfo : ResourceUnavailable: (username:ADUser) [Get-ADUser], ADServerDownException
+ FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.GetADUser
그러나 으로 지정하면 get-aduser username -Credential (Get-Credential)
정상적으로 작동합니다.
서버에서 직접 스크립트를 실행하면(rdp) 제대로 작동합니다.
Invoke-Command -Session $sess -ScriptBlock {get-aduser username}
또한 실패합니다.
2016년에 자격 증명이 다르게 전달되는 방식과 관련이 있다고 가정합니다. 누구든지 전에 이것을 본 적이 있습니까? 해결할 수 있는 방법이 있나요?
답변1
기본적으로 고전적인 Kerberos 이중 홉 문제에 직면하게 됩니다. 이전 2012 R2 서버는 Kerberos 위임 형식으로 구성되었지만 새 서버는 (아직) 구성되지 않았을 가능성이 높습니다.
다음은 PowerShell과 관련된 문제와 이를 해결하는 다양한 방법을 자세히 설명하는 훌륭한 Technet 블로그 게시물입니다.