Powershell – Enable Powershell Remoting during unattended installation

powershellunattendedwindows-server-2008windows-server-2008-r2

Is there a way to enable Powershell remoting (Enable-PSRemoting) during an unattended Windows Server 2008 R2 installation? Is there a setting in unattend.xml for this?

Best Answer

If your on a AD Domain, the prefered way would be via GPO:

  1. Enable Computer Configuration\Policies\Administrative Templates\Windows Components\Windows Remote Management\WinRM Service\Allow automatic configuration of listeners
  2. Create firewall rule inbound for Windows Remote Management