title: Find out if process is running in a cmd.exe or PowerShell window
body: <p>Imagine you're writing a program in a high level language where you are not allowed to do custom system calls (win32 API) because code is cross compiling or the language doesn't support that. </p>
  
  <p>When your process is running on windows, is there a way to find out if you're running inside powershell and not cmd.exe? Or vice versa?</p>
  
  <p>I'm trying to print "I'm running in powershell" and "I'm running in cmd.exe" from the program. </p>
  
  <p>In this case I'm writing the program in Golang but that shouldn't really matter because I don't want to traverse process tree. </p>