Reading Time: 3 minutes
Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

I thought it was about time to go back and play with Windows Nano Servers! So in this post, I am going to try and explain how to get a create an SMB File Share running on Windows Nano Server.

[themify_box style=”note”] Note: My Nano server is based in azure so some screenshots may look different.
[/themify_box]

To start we need to install the Windows Server Storage Package. This package will allow us to create a file share on Windows Nano Server.

We first need to make sure we have installed the Nano Server Package Provider. This can be done by following a previous guide “Installing Packages on Nano Server” if you have not done so already.

Connect to your Nano Server via PowerShell

Enter-PSSession -ComputerName PIXEL-NANO10
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

To install the Microsoft-NanoServer-Storage-Package enter the following command in the open PowerShell session. As my Nano server is set to the UK I need to add the –Culture switch in.

Install-NanoServerPackage Microsoft-NanoServer-Storage-Package -Culture en-us
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

Once the package has installed, you should see a message saying the server needs a restart to complete the installation.

This can be done by typing the following

shutdown /r /t 10
Exit-PSSession
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

Once the server has started again, you will need to connect back up to it.

Enter-PSSession -ComputerName PIXEL-NANO10
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

Now we have the package installed we need to create a folder that we are going to share. For this article, I am going to just create the folder on the root of C:\

New-Item -Name Share -Path c:\ -Type directory
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

Now we need to actually share the folder now.

New-SmbShare -Name share -Path c:\Share
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

To check that the share has created use the following

Get-SMBShareAccess share
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

To grant permissions on the share we can use the following

Grant-SmbShareAccess -Name share -AccountName ad.testpixels.co.uk\richard.hooper -AccessRight change
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

If you need to revoke the permission you can use

revoke-SmbShareAccess -Name share -AccountName everyone
view raw Nano_SMB.ps1 hosted with ❤ by GitHub

You should now have a share on Nano Server. This can be very useful when you need to copy files to Windows Nano Server and don’t want to use PowerShell…

Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

I agree