Remote nano server admin : quick few commands needed to get you access to box

Recently was given a project with a proof of concept involving the use of Windows 2016 nano servers (don’t even know if that’s there official title :)). Anyhow as not quite your conventional windows servers took a wee bit of lurking to find what i needed to get access.

Bit of background:

So Nano server comes with a rebuilt subset of Windows Powershell and they’ve called it Core PowerShell. Feature-set wise seems to have everything i need, full remoting capability, language compatibility etc.

As it does come with Windows Powershell Remoting it indeed is our gateway to access the server.

Requirements

i) Need to have administrator level privileges to the Nano Server

ii) Add its IP to the managed machine’s trusted hosts(assuming 192.168.1.1 is the Nano Server’s IP) to do

PS c:\> set-Item WSMAN:\\localhost\Client\TrustedHosts “192.168.1.1”

Next you can start an interactive remoting session:

PS C:\NanoServer> $ip = “192.168.1.1”

PS C:\NanoServer> $user = “Administrator”

PS C:\NanoServer> $Enter-PSSession -ComputerName $ip -Credential $user

After that you are good to go, can run commands as if you were entering directly on the nano server console eg

[192.168.1.1]: PS c:\users\test\documents> ipconfig

To get the full list of commands available

[192.168.1.1]: PS c:\users\test\documents> Get-Command -CommandType Cmdlet

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s