I'm trying to launch a PowerShell session via PSexec with alternate colors and some window attributes. The reason why I would need to run PowerShell through PSExec is so that I can have a ready-made one-click shortcut to launch a terminal window in the Local System context. This makes sense for testing scripts and code within MDT/SCCM packages on a daily basis. It sounds like a pointless thing to do but I have a lot of command windows open so it's hard for me to distinguish which terminal windows is running as system, user, local admin, etc. The colors would make it easier to see this difference immediately.
So far I'm trying this, but explorer crashes upon launch:
C:\SysinternalsSuite\psexec.exe /i /s "PowerShell.exe -NoExit -Command "& $HOST.UI.RawUI.ForeGroundColor = cyan"
I can launch PowerShell just fine, like this:
C:\SysinternalsSuite\psexec.exe /i /s powershell.exe
I'm sure it has something to do with the way the quotes are being parsed.