Wie können Sie RDP-Zugriff auf einen nicht domänenlosen Windows-Headless-Server erhalten, der in ein neues Netzwerk verschoben wurde und standardmäßig im neuen Netzwerk öffentlich ist?

806
Techrocket9

Ich habe eine Windows Server 2012R2-Box, die vor kurzem in ein neues physisches Netzwerk an einem neuen Standort umgezogen ist.

Als ich alles wieder einrichtete, stellte ich fest, dass der Hostname nicht aufgelöst werden konnte und ich nicht in der Box RDP verwenden konnte, auch nicht nach IP-Adresse. Nach einiger Fehlerbehebung stellte ich fest, dass das neue Netzwerk automatisch als öffentliches Netzwerk konfiguriert wurde und die Windows-Firewall-Standardeinstellungen für öffentliche Netzwerke RDP nicht zulassen.

Ich habe zurzeit keine Möglichkeit, einen Monitor an den Server anzuschließen. Wie kann ich RDP von einem anderen Computer im Netzwerk aus aktivieren? Ich verwende keine AD-Domäne, obwohl ich das Administratorkennwort für den Server kenne.

0

1 Antwort auf die Frage

1
Techrocket9

The Microsoft tool PsExec is the solution to this problem. It uses RPC to control remote computers, which is allowed by default for public networks by the Windows Firewall.

Once you have PsExec set up, use the command

psexec \\SERVER_IP_ADDRESS -user SOME_ADMIN_ACCOUNT powershell "Get-NetConnectionProfile" 

to find the InterfaceIndex of the network connection which is miscatagorized. Note that psexec can take 30 seconds or so to execute.

Once you have the InterfaceIndex, run this command to change the network type:

psexec \\SERVER_IP_ADDRESS -user SOME_ADMIN_ACCOUNT powershell "Set-NetConnectionProfile -InterfaceIndex INDEX_FROM_LAST_COMMAND -NetworkCategory Private" 

Once this command executes successfully the network type will become private and you will be able to RDP into the server.