I'm making an rpi based terminal in python and I want to run a powershell command on my computer. How can I send a command to a usb device
You could run socat on your Windows PC to read from serial and execute whatever you receive - if you like big security holes😉 Try adding socat tag to attract the right folk if that's an option.
Or you could run a Python script that sits in a loop reading from serial and then using subprocess.run() to execute the commands it receives.
How to send powershell command to pc through usb with python?