Vlad
Vlad
CCoder.com
Created by Vlad on 3/14/2025 in #help
PATH getting overwritten on Windows VM
Ooof... I actually resolved my issue lol by adding this to my setup script
Add-Content -Path $Profile.AllUsersAllHosts -Value '$env:Path = (($env:Path + [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")) -split ";" | Where-Object { $_.Trim() } | Select-Object -Uniq) -join ";"'
Add-Content -Path $Profile.AllUsersAllHosts -Value '$env:Path = (($env:Path + [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")) -split ";" | Where-Object { $_.Trim() } | Select-Object -Uniq) -join ";"'
5 replies