2012R2 Core and Powershell Remoting

So you’ve installed your Windows server with 2012R2 Core and the first and only thing you’ll see when logging on are:

Fresh Install

In my opinion it would have been better if the box would say powershell.exe instead of cmd.exe, but that’s my five cent.
Let’s start with running powershell instead by running powershell.exe.
A new server name could be nice instead of the default random name…

Rename-Computer server01

We probably want to set a static IP-address also, so let’s do that.

Get-NetIPInterface

IP Interfaces

Remember or write down the ifIndex of the Interface you want to set to static, in my case it’s number 12.

Remove-NetIPAddress –InterfaceIndex 12
Set-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.8 –PrefixLength 24 –DefaultGateway 192.168.0.1
Set-DNSClientServerAddress –InterfaceIndex 12 –ServerAddresses 192.168.0.1

If you like to add more DNS addresses, just use a comma-seperated list for
–ServerAddresses.

If you’re going to add the server to a domain, do like this, the Cmdlet will ask for credentials.

Add-Computer -DomainName Barrud

To activate the server

slmgr.vbs –ato

Activation
To enable Powershell Remoting this should do it…

Enable-PSRemoting

But for some reason it didn’t work for me, so I ended up doing this:

Set-NetFirewallRule –DisplayGroup (Get-NetFirewallRule|where DisplayGroup –like *remote*|select-object –ExpandProperty DisplayGroup) –Enabled True

server01_4

And now it works :)

Remoting

Leave a Reply

Your email address will not be published. Required fields are marked *