In this post I will show you how to check and change Nano Server Time Zone, Disk Space, Local admin credentials, Firewall, How to check edtion, host name etc.

  • HOW TO CHANGE TIME ZONE

Connect to your Nano Server:

Enter-PSSession -ComputerName <nanoservername> and type in Get-TimeZone

screens-4

As you can see my time zone is Pacific Standard Time, which is wrong because I live in Sweden.

First of all I would like to check all available Time Zones

Get-TimeZone -ListAvailable | ft

screens-5

I will change my time zone to W. Europe Standard Time

Set-TimeZone -name “W. Europe Standard Time”

 

screens-7

  •  HOW TO CHANGE LOCAL ADMIN PASSWORD

First let’s check the admin info by typing

Get-LocalUser -Name Administrator |fl

screens-8

The Microsoft .NET Framework provides the SecureString object, which is a secure representation of a string. The following PowerShell command masks the string on the screen as you type it and stores it in a SecureString object:

$Password = Read-Host “Password” -AsSecureString

OBS!!!! “Password” — This is not the place where you are going to type in new pass

screens-11

 

To change the password we need to type in

Set-LocalUser -Name Administrator -Password $Password

screens-12

 

To verify type in Get-LocalUser -Name Administrator |fl

screens-13

  • HOW TO VIEW EVENT LOG FILES (NANO SERVER)

It will be very hard to view those log files with powershell so our best option is to use MMC on the management machine.

First, you will need to open firewall ports. If you do not enable it you will receive this error message

screens-14

First type in:

Netsh advfirewall firewall set rule group=”Remote Event Log Management” new enable=yes

screens-15

Next, open MMC on the management machine and connect to Nano server and that’s it.

screens-16

  • HOW TO CHECK NANO SERVER EDITION, INSTALLATION DATE AND VERSION

Get-ComputerInfo -Property Windows*

screens-17

  • HOW TO CHECK DISK, RESIZE IT,  VIEW PARTITION

To check the disk we need to run

Get-Disk 

screens-18

To resize it we need to first edit and expand it in Hyper-V manager (If you are not familiar with Hyper-V, please take a look on my Deep Dive into Hyper-V 2016 series)

screens-19

New size will be 15 GB

screens-20

Now if we run Get-Partition we will see that the actual partition size is still 4 GB

screens-21

To specify a new size type in

Resize-Partition -DiskNumber 0 -PartitionNumber 1 -Size (“Size in GB”)

screens-22

New Size

screens-23

 

  • HOW TO CHECK FIREWALL AND MODIFY IT

To view Firewall Profile (Domain, Private, Public)

Get-NetFirewallProfile | select name, enabled

screens-24

If you would like to disable or enable it, you can do it by running

Set-NetFirewallProfile domain/private/public -Enabled/ False

screens-25

To view rules

Get-NetFirewallRule |ft

screens-26

If you would like to enable or disable specific rule you can do it by typing 

Set-NetFirewallRule -Name “Firewall Rule Name” -Enabled True / False

To view which rule is enable or disabled

Get-NetFirewallRule |select name, displaygroup, enabled

screens-27

Cheers,

Nedim