xp_cmdshell error

That looks like something in shell.ps1 isnt coded correctly.

The error is saying it doesn’t like the ampersand in: iex$data2>&1

Without knowing what your shell.ps1 contains, my first guess would be it is the exact same typo. The bit should probably read: iex $data 2>&1

Spaces really do matter. If you are copying/pasting from an online guide, it might be badly formatted.