Apparently the escape character for cmd.exe is ^.

So if you want to do the equivalent of echo "\$PATH = $PATH" in Windows, you would do echo "^%PATH^%=%PATH%"

In PowerShell, things are a bit different. They decided to change the variable identifier to $, which is nice and consistent with unix. Still didn’t use the \ character for escaping, though. The reason is that it overlaps with the path separator from DOS. So instead, you must use ` (back tick). Of course, this messes with me since in bash back tick is used to execute a command and return the output in to a variable.

CMD.EXE Escape characters
PowerShell Escape Sequences