Path Environment Variable Windows 10. Echo %Path% on command prompt shows only %Path% [duplicate]

PowerShell uses a different syntax than Windows Command Prompt.

Use $Env:Path or Get-ChildItem Env:Path to retrieve the PATH variable.

Source: Creating and Modifying Environment Variables - Microsoft Technet


Since Windows 10 Insider Build 14971 Microsoft changed the default command shell to be PowerShell instead of cmd.

PowerShell handles environment variables differently to cmd.

To display their values in PowerShell use the following syntax:

$Env:variablename

Example:

> echo %Path%
%Path%
> $Env:Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\apps\WSCC\Sysinternals Suite;C:\apps\WSCC\NirSoft Utilities
>

Further Reading

  • An A-Z Index of Windows PowerShell commands - An excellent reference for all things PowerShell related.
  • Environment Variables
  • Take Charge of Environment Variables in PowerShell