Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save turboBasic/138c2cd8a49f9c81cad7ed58ccff06bb to your computer and use it in GitHub Desktop.
Save turboBasic/138c2cd8a49f9c81cad7ed58ccff06bb to your computer and use it in GitHub Desktop.
Enable-WindowsServer2016RemoteManagement.ps1 - Enable remote management of Windows Server 2016 using Powershell #powershell #windows-server #windows-server-2016 #windows #windows-10
# Based on https://serverfault.com/questions/852144/how-do-i-remotely-manage-hyper-v-2016-standalone-via-windows-10
# on the Server which you are going to start managing remotely^
# 1. run sconfig in cmd.exe
# 2. Set computer name (eg. server-1) (do NOT use periods)
# 3. Configure remote management (disabled => enabled)
# 4. Configure Remote Desktop (disabled => enabled)
# 5. start Powershell
# the following should be entered in Powershell window
Enable-PSRemoting
Enable-WSManCredSSP -role Server -force
# Enable management using Computer Management
Get-NetFirewallRule | Select DisplayGroup -Unique | Sort DisplayGroup
Get-NetFirewallRule | Where DisplayGroup –like "Remote Event Log *" | Format-Table
Enable-NetFirewallRule -name RemoteEventLogSvc-In-TCP, RemoteEventLogSvc-NP-In-TCP, RemoteEventLogSvc-RPCSS-In-TCP
Get-NetFirewallRule | Where DisplayGroup –like "Remote Volume *" | Format-Table
Enable-NetFirewallRule -name RVM-VDS-In-TCP, RVM-VDSLDR-In-TCP, RVM-RPCSS-In-TCP
# on the desktop from where you are going to manage server:
# 1. change network type (public => private)
# 2. start elevated Powershell
Enable-PSRemoting
Set-Item WSMan:\localhost\Client\TrustedHosts -value * -force
Enable-WSManCredSSP -role Client -delegateComputer * -force
# Enable-WindowsOptionalFeature -online -featureName:Microsoft-Hyper-V -All
cmdkey /add:server-1 /user:Administrator /pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment