USB was developed without taking into account the security of users. Windows, Linux and macOS trust any connected USB port. If the hacker has physical access to your computer, in this case the attack vector using USB becomes very dangerous.
Undoubtedly, you know about the existence of the Windows PowerShell environment. It plays a very prominent role among Microsoft products. Although Windows PowerShell includes a simple and powerful language for writing scripts. One of the advantages of this technology is that it can be used as a convenient command shell without writing complex scripts.