M-x eshell
Welcome to the Emacs shell
/tmp $ set-variable `x 6; echo $x
6
/tmp $
M-: (term "pwsh") PowerShell 7.4.0
PS /tmp> set-variable `x 6; echo $x
6
PS /tmp>
Disturbing.