Just to bring Rob’s comment to light:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
More Related Contents:
- Read file line by line in PowerShell
- Create directory if it does not exist
- Powershell output column width
- Renaming files by reformatting existing filenames – placeholders in replacement strings used with the -replace operator
- Powershell Invoke-WebRequest Fails with SSL/TLS Secure Channel
- How can I find the Upgrade Code for an installed MSI file?
- How to enter a multi-line command
- Add a where-object on a table construct?
- Is there a way to create an alias to a cmdlet in a way that it only runs if arguments are passed to the alias?
- Is there a way to make a PowerShell script work by double clicking a .ps1 file?
- How to redirect the output of a PowerShell to a file during its execution
- How can I make PowerShell handle [ or ] in file name well?
- What’s the difference between .replace and -replace in powershell?
- Ternary operator in PowerShell
- Scheduled Task Powershell Script – Runs OK as user account, but not as SYSTEM
- Powershell color formatting with format operator
- Powershell string variable with UTF-8 encoding
- Controlling column widths with Format-Table
- Calling dynamic variable in PowerShell
- Passing string in Get-ADUser filter parameter causes error – property not found in pscustomobject
- Iterate over PSObject properties in PowerShell
- Problems using local variables in a remote commands
- How to make an authenticated web request in Powershell?
- $string.Substring Index/Length exception
- How do I compress files using powershell that are over 2 GB?
- Issue with Powershell update string in each file within a folder
- Running CMD command in PowerShell
- Connecting to a network folder with username/password in Powershell
- How to uninstall an app that another user installed?
- Uploading file to HTTP via Powershell