Advertisement
justinooo

PowerShell 'Refresh-Path' function

Jun 25th, 2024
883
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Refresh-Path {
  2.     $global:env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
  3.     Write-Output "PATH refreshed."
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement