From f16309630e7cc9cd146880578bfef5cdf4488f7a Mon Sep 17 00:00:00 2001 From: alexis-turpin <106575@supinfo.com> Date: Tue, 1 Nov 2016 22:56:18 +0800 Subject: [PATCH] Update the PowerShell example to set the PATH (#9771) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `set PATH=%PATH%;C:\terraform` is the old fashioned CMD ways to do which doesn't work in a PowerShell command line. Moreover, the change made in the CMD console would not be permanent. The solution proposed here uses .NET Framework’s System.Environment class in PowerShell to properly edit the path. Source : https://technet.microsoft.com/en-us/library/ff730964.aspx --- website/source/intro/getting-started/install.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/intro/getting-started/install.html.markdown b/website/source/intro/getting-started/install.html.markdown index bf001796c6..ca16172f7f 100644 --- a/website/source/intro/getting-started/install.html.markdown +++ b/website/source/intro/getting-started/install.html.markdown @@ -31,7 +31,7 @@ Example for Linux/Mac - Type the following into your terminal: >`PATH=/usr/local/terraform/bin:/home/your-user-name/terraform:$PATH` Example for Windows - Type the following into Powershell: ->`set PATH=%PATH%;C:\terraform` +>`[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ({;C:\terraform},{C:\terraform})[$env:PATH[-1] -eq ';'], "User")` ## Verifying the Installation