#get all environment vars
gi env:
(gi env:) | sort name
#get path value
gi env:path
(gi env:path).value
(gi env:path).value.split(';')
(gi env:path).value.split(';') | sort
#set path value (note the "$" prefix)
$env:path = 'c:\windows;c:\windows\system32;'
11/3/10
Setting Windows Path Environment Variable with PowerShell
Labels:
environment,
path,
powershell,
variables,
windows
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment