How To Reset The Local Administrator Password On Windows Nano Server 2016

In this article, I’ll show you how to reset the local Administrator password on a Windows Nano Server 2016 using two simple cmdlets.

So far windows Nano Server 2016 has been a hit in terms of adoption by enterprises and IT Professionals.

Since October 31th, 2016 GA released, I have been deploying many Hyper-V hosts running Nano Server 2016 and the results are amazing It terms of performance, Security, Management, and scalability.

To get started, The first step In resetting the password Is to connect to Nano Server using PowerShell Remoting or PowerShell Direct:

For PowerShell remoting use the code below for Domain Joined Nano Server:

Enter-psSession HOSTNAME

For Non-Domain Joined Nano Server Use:


Set-Item WSMan:\localhost\Client\TrustedHosts $ip -Confirm:$false

$password = ConvertTo-SecureString "Type Password Here" -AsPlainText -Force

$cred= New-Object System.Management.Automation.PSCredential ("administrator", $password )

Enter-PSSession -computername $ip -Credential $cred

To connect using PowerShell Direct use:

Enter-Pssesion -vmname NANOVM

Once you logged In to the Nano Server, run the cmdlet below to set the password and save Into a secure variable.

$Password = Read-Host "Enter Passord" -AsSecureString

Next, I’ll reset the password to the using the cmdlet below:

Set-LocalUser -Name administrator -Password $Password

To check If it worked, I use the cmdlet below to check the last password change date.’

Get-LocalUser -Name administrator | fl

For our Nano Server articles database (70+ articles) visit

1 thought on “How To Reset The Local Administrator Password On Windows Nano Server 2016”

  1. Testing a nano server on AWS. In trying to reset the password I’m getting the following Error:
    Read-host : Cannot display the prompt for “enter Password” because type “System.Security.SecureString” cannot be loaded.” Is this not standard with Nano?
    A couple of other thoughts. 1) In this case I’m connecting http on port 5985 which seem a little non-secure to be setting password that is going over the network. 2) Wouldn’t it be better to open the secure ports (5986) prior to setting the password? I would think the default connection would be secure rather than http. Maybe that’s an AWS configuration rather than nano.

Comments are closed.