11/3/10

Setting Windows Path Environment Variable with PowerShell

#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;'

No comments:

Post a Comment