Powered by Blogger.

Nano Server Administration 2016

Windows Server 2016 has a new installation option: Nano Server . It is a remotely managed server operating system optimized for data centers and private clouds. It is similar to Windows Server in Server Core mode , but it is much smaller, has no local logon capabilities, and only supports 64bits agents, tools, and applications.

After installing Nano Server 2016 on Oracle Virtualbox, we will see in this article how to administer the server remotely using Windows PowerShell.
Nano Server Administration
Network configuration via the Console

Connect to your server. Once on the Console, we will start by configuring the network. With the keyboard arrows, position yourself on
> Networking <Enter>
The adapter must be present:> <Enter> Ethernet (@MAC) 
Touch : F11 IPv4 Settings
Key: <Tab>F4 pour désactiver DHCP 
IP Address : <Tab>
Sugnet Mask : <Tab>
Default Gateway : <Enter>

Save by pressing the Enter key and confirm again with the Enter key . Esc to return to the Recovery Console.

F12 if you want to configure IPv6 manually. For my part, I left the automatic configuration for IPv6. To reboot the server: CTRL + F6

That's all we can do from the console directly. You can also enable or disable firewall rules. The rest is done remotely via PowerShell Remoting for example.
Remote Administration via PowerShell

For starters, you may need to start the WinRM service on your machine to enable remote connections. From the PowerShell console (Run as Administrator), type the following command:

PS C: \ Users \ Administrator> net start winrm 
The requested service has already been started.You will get additional help by entering NET HELPMSG 2182.PS C: \ Users \ Administrator>

Add your Nano Server to the WinRM trusted list:

PS C: \ Users \ Administrator> WSMan Set-Item : \ localhost \ Client \ TrustedHosts -Value ""

To add more, separate the IP addresses with a "," (it's easier with the name if you have a DNS server)

Connect to the server by typing this command:

PS C: \ Users \ Administrator> Enter-PSSession -ComputerName -Credential Administrator

A window appears, fill in the password and confirm to connect.

Adding DNS servers

Now that you can connect to the remote server, you have to configure the DNS server. It sucks that we can not do it from the console during network configuration above ... in short, it is possible via PowerShell.

Run the following command to know the interfaces ID:

[]: PS C: \ Users \ Administrator \ Documents> Get-DnsClient

Here, the ID of my interface is "3" (Ethernet).

We can of course take a quick look before modifying. View network conf with this command:

[]: PS C: \ Users \ Administrator \ Documents> Get-NetIPConfiguration

Add your DNS servers:

[]: PS C: \ Users \ Administrator \ Documents> Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses ( " ", " ")

Change the name of the machine

To rename your server, type the following command:

[]: PS C: \ Users \ Administrator \ Documents> Rename-Computer -NewName NanoServer -PassThru

Do not forget to restart the server. Ctrl + F6 <Enter>
Join the server to the domain

Finally, we will join the NanoServer machine to the pixelabs.fr domain (Windows Server 2016 AD Server). How it works :
From a domain controller , you need to generate a file (blob file) containing domain information.
Copy blobs files to the Nano Server
Run djoin.exe from the Nano Server taking into account the file
Restart Nano Server.

Create the file from your domain controller (not from Nano Server) using the following command:

PS C: \ Users \ Administrator> djoin.exe / provision / domain pixelabs.fr / machine NanoServer / savefile . \ Odjblob

The file is saved in .\ ie>C:\Users\Administrateur\

We can check with the following command (always from your domain controller):

PS C: \ Users \ Administrator> Get-ADComputer -Identity NanoServer

Now you have to transfer this file to the Nano Server. It can be done in several ways:> Copy the file with PowerShell, mapped a network drive (Nano Server) on the domain controller, and the simplest> open File Explorer > click Network at the bottom, and type in the bar at the top: \\\c$ (to complicate life ...)

Then copy the file to Nano Server.

From Nano Server now (via PowerShell, so you're still on your domain controller, but remotely connected to Nano Server) join Nano Server to the domain using the following command:

[]: PS C: \ Users \ Administrator> djoin.exe / requestodj / loadfile c: \ odjblob / windowspath c: \ windows / localos

Restart your server: shutdown /r

Connect to the Nano Server Console, the domain should appear:

I will update this article soon ....
    Blogger Comment
    Facebook Comment