How To Connect To Windows Nano Server 2016 Using PowerShell

How To Connect To Windows Nano Server 2016 Using PowerShell

 

In this blog post, I’ll show you How To Connect To Windows Nano Server 2016 Using PowerShell remotely, its also known as WinRM.

Windows Nano Server 2016 Is a “headless” Server without a GUI or a Management Interface that can only be managed using Remote PowerShell or PowerShell Direct which was released with Hyper-V 2016.

Windows Nano Server comes with a cut-down version of PowerShell 5.1 with fewer modules and packages compared with Windows Server 2016 or Windows 10, You will also notice that while some cmdlets are available on Nano Server they don’t work when using them.

To connect to Windows Nano Server 2016 using PowerShell use the code below, Just make sure you have the Nano Server IP address available and replace it with the IP address In the code below.

The first line will add the IP address of the Server \ Workstation you are connecting from to the list of the Trusted Host on your machine, that line Is needed once If you are connecting to the Nano Server from the same IP all the time.

The second line will start a remote session with the user administrator.

Set-Item WSMan:\localhost\Client\TrustedHosts -Value 192.68.0.13 -Concatenate
Enter-PSSession -ComputerName 192.68.0.13 -Credential Administrator

Once you type the code, you will get a prompt to enter a password.

How To Connect To Windows Nano Server 2016 Using PowerShell
How To Connect To Windows Nano Server 2016 Using PowerShell

Once logged In you can use PowerShell to configure the Server.

How To Connect To Windows Nano Server 2016 Using PowerShell
How To Connect To Windows Nano Server 2016 Using PowerShell

To view all available PowerShell module on you Nano Server type:

Get-command

To view all the Installed module type:

Get-Module -ListAvailable

Please remember that If you are connecting to a Domain Joined Nano Server using PowerShell from a domain joined workstation with a user that has access to the Nano Server you can use the code below:

Enter-pssession nanoserver

There Is no need to use all the code above because PowerShell will NTLM authentication to log you on to the Nano Server.

Search








Bitnami