Пробовал миллиард способов заставить это работать, и я просто не могу это решить.
Я пытаюсь настроить RDS удаленно, но он продолжает говорить мне Unable to connect to the server by using Windows PowerShell remoting
.
Я бежал Enable-PSRemoting -Force -SkipNetworkProfileCheck
но он все еще не работает.
Это также работает на том же сервере, и я отключил IPv6.
PS C:\Windows\system32> Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock {param($srv) New-RDSessionDeployment -ConnectionBroker $srv -WebAccessServer $srv -SessionHost $srv} -ArgumentList $server
Validation failed for the "RD Connection Broker" parameter.
EC2AMAZ-VN782KT.directory.local Unable to connect to the server by using Windows PowerShell remoting. Verify that you can connect to the server.
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-RDSessionDeployment
+ PSComputerName : EC2AMAZ-VN782KT.directory.local
Я тоже пробовал это
PS C:\Windows\system32> Enter-PSSession -ComputerName $server -Credential $creds
[EC2AMAZ-VN782KT.directory.local]: PS C:\Users\Admin\Documents> whoami
directory\admin
[EC2AMAZ-VN782KT.directory.local]: PS C:\Users\Admin\Documents> $server = (Get-WmiObject win32_computersystem).DNSHostName + "." + (Get-WmiObject win32_computersystem).Domain
[EC2AMAZ-VN782KT.directory.local]: PS C:\Users\Admin\Documents> New-RDSessionDeployment -ConnectionBroker $server -WebAccessServer $server -SessionHost $server
New-RDSessionDeployment : Validation failed for the "RD Connection Broker" parameter.
EC2AMAZ-VN782KT.directory.local Unable to connect to the server by using Windows PowerShell remoting. Verify that you can connect to the server.
At line:1 char:1
+ New-RDSessionDeployment -ConnectionBroker $server -WebAccessServer $s ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-RDSessionDeployment
Однако, если я запускаю следующее, оно работает, что говорит мне, что удаленное взаимодействие работает!
PS C:\Windows\system32> Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock {param($server) Write-Output $server } -ArgumentList '123'
123