Transfer files from a USB stick to Windows 10 IoT Core local storage - powershell

I have a Raspberry Pi 3 running Windows 10 IoT Core. How can I copy files from a USB stick connected to the device to the local SD card storage? Is this possible using PowerShell?
Ideally I want to do this without the need for a UWP app running on the device and any interaction via a local GUI.
Currently when the device is running its default app and I insert a USB stick nothing happens like it does on a desktop edition of Windows 10.
To further clarify I also don't want to navigate to the devices storage via a UNC path copying files between network locations. The files have to be sourced from the USB stick.
Thanks

You can definitely use PowerShell for this.
Firstly I would use the IoT Dashboard to open a new PowerShell remote management session to my Windows IoT device.
Insert the USB stick if it isn't already.
Then use the following PowerShell command to review the devices local drivers.
gdr -PSProvider 'FileSystem'
This will return a list of all drives attached. Like below.
Note; drives C, D and U are used by the device and system.
Then use a XCOPY in the PowerShell session once you know the drive letter your USB stick has been assigned. Eg. E above.
XCOPY E:\ C:\Data\FromUSB\
This will copy everything from the root of the USB stick to a folder on the devices SD card called 'FromUSB' in the Data parent directory.
Note; creating custom folder on the root of the C drive may not appear to some UI's.
Hope this helps.

Related

RaspberryPi home NAS

I am looking for some solution to turn up my RPi3 to home NAS. I am running out of space in Google Photos so I would like to store my photos on my own drive. I was looking for some solution but I didn't found something good.
My idea:
On RPi is running some system with my own HDD drive
That system have some settings where I can sleep that drive - e.g. during night so it doesn't make sound
I can access that storage through webapp which is on localhost
(optional) Store there not only photos and videos but also some files
That system has some android app which could sync my photos&videos to that NAS
(question) Could I access NAS from outside my home? I have read that is some solution to just edit something in Wifi router to access it from outside but idk if it is safe and even possible.
Thank you for answers, this topic is not very familiar with me so I am asking.
You're probably looking for something like OpenMediaVault:
https://www.openmediavault.org
I've used this on pi boards previously, though I've subsequently focused more on NFS and GlusterFS-based solutions I've built myself. Here's a three-node GlusterFS cluster that shows a few of the options for storage - those same options can be used for OMV.
For the storage devices you can use a USB to SATA cable with an HD (spinning disk will require external power, SSD generally won't), or use various USB solutions, like those shown here - regular USB keys or USB-NVMe. Make sure you use pi4 boards, which have USB-3 (the early models only had USB-2)
Good walkthrough here

XCOPY command to copy files to SAN Storage

Is there any command to transfer files to SAN storage usin xcopy? Please help me
SAN storage devices are typically of 2 classes: NAS and Block. The first use file-level access, i.e. use NFS, SMB/CIFS and etc (even FTP) to transfer files there.
Block-storage devices provide their space as raw drive-space, which is used as drives on the servers. So you have to attach the drive, create a new or mount an existing file-system to be able to copy files there.

Mount any USB key plug on a port usb in the same folder

I'm currently working on a embedded application on a raspberry pi 3 with Raspbian Jessie. The purpose of this applicatin is to write data in an excel on any usb key (which is always plug on the same port on the raspberry pi)
Current State
Currently, the path where i want the data is directly written in my code
USBadress='/media/pi/DATA3'
Problem
If the usb key is mounted elsewhere or if i'm using a different USB key my application doesn't work
What I tried
Modify the fstab to automaticlly mount /dev/sda1 on a specified folder (ex : media/pi/genericFolder but sometimes the usb key path is different (/dev/sdb1) and this solution only seems to work if you turn on your pi with your usb key already plug (which will be not be true everytime in my case)
I also tried with the UUID but this solution can't work cause my goal is to have a generic solution working with any usb key i plug in this specific usb port
I also saw some solutions with a rule specified on udev but I didn't understand very well...
Thank you in advance !!
Finally found a solution with the following line :
myPath=str(os.popen("mount | grep /media/pi").readlines())
MyPath=MyPath.split(" ")[2]

How to Copy SmsTSLog file to USB

I'm trying to deploy an operating system to a target machine via SCCM.
Unfortunately, there are errors in the deployment process and as a consequence, the target machine has not received the operating system correctly.
In order to ascertain what errors are occurring in the deployment process, I wish to view log file(s) for errors. These errors are invariably located in the SMSTSLog file on the target machine.
In given the fact that the target machine is not booting, how can one copy the SMSTSLog from the target machine onto an external USB key in order to view that log file for various errors on another computer?
Plug in into the target machine the USB key which contains the
task sequence for deployment .
Press F12 (Dell machines) to load the boot options.
If it's a legacy boot then choose the USB Storage which contains the task sequence.
or
If its a UEFI boot then choose UEFI option.
For help in identifying which boot option, look at the memory size of the mounted external memory on the boot list.
If the size listed is similar to the size of your USB stick (e.g. UEFI: Jetflash 2GB) then this is your target USB stick to boot from.
Wait for the files to load from the USB.
When the task sequence launches from the USB stick press F8
to bring up a command prompt. Note: Pressing F8 multiple times launches multiple command prompts.
A Task Sequence Wizard window may appear. Simply move this window to
the side of the screen as you are only interested in bringing up a
command prompt.
It is necessary to identify the label volume for the external USB key.
To do this do the following inside the command prompt:
type: Diskpart
Then type: List Volume
You will see a number of volumes listed.
Look for the volume of type removable (as you should only have one removable USB connected to the machine at this time) and
note its label e.g. D
Press F8 again to bring up another command prompt window.
You will now attempt to copy the log file with the following command:
xcopy [source] [destination]
E.g. Type: xcopy X:\windows\temp\SMSTSLog*.* D:\
Source is: X:\windows\temp\SMSTSLog*.*
Destination is: D:\
Then simply remove the USB stick and open in another machine to view SMSTSLog with your editor of choice.

What does it mean to add a virtual disk image to a virtual CD/DVD drive on a virtual machine?

I'm currently installing virtual box, and one of the steps requires that I add a disk image (in my case, an ubuntu ISO file) to a virtual CD/DVD drive listed under the virtual machines Storage.
From what I understand the ISO basically contains all the contents of ubuntu. And once I've allocated enough disk space for my virtual machine, I need to install ubuntu by reading from this ISO file into my virtual hard drive.
So- is that the reason why I need to add the ISO image to my dvd/cd? Because it acts as an ACTUAL cd/dvd? My understanding is limited - I just want more clarification about this process!
.iso files are images of the entire content of a CD. They are meant to be burnt on a actual CD. But there are now several programs allowing to read the content of an .iso file without actually writing the data to a CD.
You're right in everything you said.
Virtual Box simulates (almost) everything of a real computer: disks, drives, memory, USB ports...
The drive is initially empty, i.e. has no CD/DVD inside.
Then you choose which CD should be simulated inside the drive. It can be either the actual CD on your physical machine, or a CD image, i.e. a .iso file.
When some program inside the virtual machine wants to access the data written on what it thinks is the CD, Virtual Box reads the .iso file and answer the program, as if the data came from a CD.
Virtual box uses virtual drives. These drives act as 'actual' drives on the guest OS, in your case Ubuntu would be the guest OS.
When you create a new virtual machine, it is clean, nothing has been installed yet.
In order to install Ubuntu on the machine you will need to load the ISO image into the virtual CD/DVD drive to install it.
Note: A ISO is a 'disk image' that contains the entire contents of a disk in a single file, that can be loaded into virtual drives, or burned to physical CD/DVDs
Here is a small tutorial on install Ubuntu to virtual box, the screen shots may differ a little bit, but the process will generally be the same for you.
http://osxdaily.com/2012/03/27/install-run-ubuntu-linux-virtualbox/