Now we move on to the most powerful way that we can interact with our remote and headless servers, PowerShell. If I've said it once, I've said it a thousand times - PowerShell has the capability to change anything in the operating system; it's just a matter of figuring out the right commands and cmdlets to use. By establishing a remote PowerShell connection to a server, you can manipulate any facet of that machine right from the pretty blue window that is running on your local computer. In this recipe, we will use PowerShell from both a Windows Server 2016 running Desktop Experience and from a Windows 10 client computer.
As we continue to figure out how to remotely manage our new CORE1 and NANO1 servers, we will now be using PowerShell from both our CA1 server and from our Win10 client computer to see what we can or cannot accomplish with these two servers.
Since we are already logged into the CA1 server, let us try to launch a remote PowerShell connection to CORE1 from inside Server Manager. If you are already logged into a server, or if you have installed RSAT to give yourself Server Manager on your local computer, this is a quick and easy way to establish PowerShell remoting:
hostname
command into my remote PowerShell window, it responds that the system hostname is CORE1.
Remove-WindowsFeature Web-Server
Now let's change gears a little and move away from using a server to remotely manage our system. Instead, I am going to log into a regular Windows 10 client computer, which does not have any of the server tools installed, and use PowerShell right from there to remotely connect to my NANO1 server:
Enter-PSSession -ComputerName NANO1
Set-Item wsman:localhostclient rustedhosts NANO1
Enter-PSSession
cmdlet parameters slightly. This is because I am running PowerShell inside my domain login, but NANO1 is not joined to the domain and so it will not yet recognize my domain credentials. Enter-PSSession -ComputerName NANO1 -Credential administrator
We have now explored a variety of ways that you can remotely connect to and manipulate your headless servers such as Server Core and Nano Server. PowerShell is by far the most powerful way to accomplish this, but it is also the most complicated if you are not familiar with using PowerShell cmdlets in your everyday work. While a learning curve is involved, this is the best avenue to pursue as you enhance your IT capabilities.
It is important to note that Nano Server is still brand new, and is still evolving as a technology. The processes and procedures that you use to build and interact with new Nano Servers may change over the coming months as people settle into using Windows Server 2016 and Microsoft makes adjustments to improve it.
If you have any interest in Azure, or even if you don't, make sure you check out the new cloud capability they are providing that helps you manage your servers. The Server Management Tools (SMT) are a collection of tools, which allow you to interact with all of your servers. You can manage Windows servers running Desktop Experience, or Server Core, or even Nano Server, and you can do it all from your web browser! Yes, this does involve logging into Azure, which means you need an Azure account, but this is one of their free offerings. You can connect both Azure virtual machines as well as your on-premise servers to SMT in order to view data about them and even make changes on them. Things as simple as shutting down or restarting a Nano Server can be complicated to figure out from your local desktop, but they are simply and easily done by using SMT.
13.58.53.238