title: JAVA_HOME, MAVEN_HOME and PATH variables are not echoing though path is set in Windows machine
body: <p>I am using Windows Server 2012 R2. I Have set JAVA_HOME, MAVEN_HOME and updated the same in PATH variable too with "bin" folder. I am able to execute java and mvn command. But when I echo JAVA_HOME and MAVEN_HOME, it does not echo anything back. 
  Because of this problem my build is failing in TFS and none of the system and user defined variables are recognised in the build (this windows machine is used as build machine in TFS)</p>
  
  <p>JAVA_HOME = C:\Program Files\Java\jdk1.7.0_80
  MAVEN_HOME and M2_HOME = C:\apache-maven-3.3.2</p>
  
  <p>Following are set in "computer"->right click->"properties"->"new variable" and added there. Updated PATH variable also in similar manner.</p>
  
  <p>PS C:\Users\raji echo $JAVA_HOME
  PS C:\Users\raji</p>
  
  <p>PS C:\Users\raji echo $MAVEN_HOME
  PS C:\Users\raji</p>
  
  <p>PS C:\Users\raji echo $M2_HOME
  PS C:\Users\raji</p>
  
  <p>PS C:\Users\raji echo %JAVA_HOME%
  PS C:\Users\raji %JAVA_HOME%</p>
  
  <p>but java -version and mvn -version are working. How do I fix this?</p>