How to Copy a File on a Nano Server with PowerShell

How to Copy a File on a Nano Server with PowerShell

How to Copy a File on a Nano Server with PowerShell. As you know, Nano Server has no communication path except PowerShell Direct. In the previous articles, we explained how to connect to a Nano Server. Now you may ask how can a file be sent to a nano server? Or how to copy the required files to the Nano Server?

From the series of Nano Server tutorials, in this article, we will teach you how to copy a file on a Nano Server with PowerShell.

It may seem at first that uploading a file to a site and downloading it with PowerShell will solve this issue. Yes that’s right. This is a simple and of course Linux way. When connecting to SSH Linux, you will not be able to send the file directly, but in PowerShell it is possible to copy a file from the host to the destination server, which is the nano server.

Recommended Article: Introducing JetBackup For Linux Server

Copy the file to the Nano Server with PowerShell

First, enter the information needed for the connection or the session in a variable as shown below:

$session = New-PSSession -ComputerName -Credential administrator


In the above command, $session is our variable name and will be the IP address of the Nano Server.

Finally, we have entered the name Administrator as a username.

After entering the above command, enter the following command to copy the file:


Copy-Item C:\VMs\NanoServer\* -Destination c:\files\Nano -recurse -ToSession $session -Verbose


After entering the above command you will copy a file named Michael.txt from C:\VMs\Nanoserver to C:\files\Nano.


Note 1: If you are asked for a password, enter your Nano Server password after entering the above command.

Note 2: The address entered in the nano server that is entered in the Destination section must be pre-created.

You have simply copied the file you want to your nano server.


Also, see:

How to Install Nano Server

How to add a Package of Roles to the Nano Server


Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.




How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

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

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day