Я пытаюсь использовать WINRM для подключения к одному хосту (во внутреннем домене), а затем оттуда WINRM на другой сервер в другом домене (DMZ). Ниже приведен пример:
$domainServer = 'DOMAINSERVER'
$dmzServer = 'DMZSERVER'
$domainCred = Get-Credential -Message "Enter domain creds"
$dmzCred = Get-Credential -Message "Enter dmz creds"
Invoke-Command -ComputerName $domainServer -ArgumentList $dmzServer,$dmzCred -ScriptBlock {
Write-Host "connected to $domainServer"
Invoke-Command -ComputerName $args[0] -ScriptBlock {
Write-Host "connected to $args[0]"
} -Credential $args[1]
} -Credential $domainCred
Однако, когда я пытаюсь это сделать, я получаю эту ошибку:
[DMZSERVER] Connecting to remote server DMZSERVER 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.
Я могу открыть сеанс WINRM из DOMAINSERVER в DMZSERVER, если я вхожу в систему в DOMAINSERVER и откройте консоль и попробуйте там, так что проблема в чем-то с моим вложенным "invoke-command
"