Export Compiled Binary

powershell -Command "$env:FQBN_DIR=('esp32:esp32:esp32wroverkit:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=min_spiffs,DebugLevel=none,PSRAM=enabled,EraseFlash=none' -split ':')[0..2] -join '.'; $dest='C:\\Users\\garry\\OneDrive\\Garry's Stuff\\Documents\\Arduino\\I2C_Hydroponics_Controller\\Final_I2C_Hydroponics_Controller_V11\\build\\' + $env:FQBN_DIR; New-Item -ItemType Directory -Force -Path $dest | Out-Null; Copy-Item -Force -ErrorAction SilentlyContinue -Path 'C:\\Users\\garry\\AppData\\Local\\arduino\\sketches\\C1AF195EE9195BE567AE1A6B049AFB7B\\Final_I2C_Hydroponics_Controller_V11.ino.*' -Destination $dest"
At line:1 char:255
+ ...  ':')[0..2] -join '.'; $dest='C:\Users\garry\OneDrive\Garry's Stuff\D ...
+                                                                 ~
Unexpected token 's' in expression or statement.

Back in post #3 I said it was the embedded " ' " in the command. And the full error log supports that. And if you look at the powershell command above it, that shows it clear as day.

$dest='C:\\Users\\garry\\OneDrive\\Garry's Stuff\\Documents\\Arduino\\I2C_Hydroponics_Controller\\Final_I2C_Hydroponics_Controller_V11\\build\\' + $env

$dest is assigned a path enclosed in single quotes. And there's a single quote in the path itself. You can't do that. Either change the command or change the path.

This isn't rocket science folks. Look at the error message which tells you what the problem is, look at the command string to see where the problem is, then fix it. Changing the path to take out the embedded single quote is likely the easiest thing.