Here's an example of getting a setting an Environment Setting using WMI on a remote PC.

Try using Microsoft WMI Object Browser to discover what fields are in the returned value. Microsoft WMI Tools

Code:
 Function WMIEnvironmentSetting($hostname,$ENV,$Value,$Type)
? "Function WMISetEnvironmentSetting:"
? " ($hostname, $ENV, $Value, $Type)" ?
Select
Case $type = "set"
$WMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\$hostname\root\cimv2")
If @ERROR <> 0
? " Error connecting to WMI interface"
$WMIEnvironmentSetting = 1
?
Exit
Else
? " WMI interface connection successfull"
$EnvironmentCommands = $WMIService.ExecQuery("Select * from Win32_Environment Where Name = '$ENV'")
If @ERROR <> 0
? " Error connecting to Win32_Environment "
$WMIEnvironmentSetting = 1
?
Exit
Else
? " Win32_Environment connection complete"
For Each $EnvironmentCommand in $EnvironmentCommands
? " Current Setting: " + $EnvironmentCommand.VariableValue
$EnvironmentCommand.VariableValue = $Value
If @ERROR <> 0
? " Cannot set Environment Setting for $env"
$WMIEnvironmentSetting = 1
?
Exit
Else
$EnvironmentCommand.put_
If @ERROR <> -2147352573
? " Cannot set Environment Setting for $env"
$WMIEnvironmentSetting = 1
?
Exit
Else
? " Environment Setting for $env set to: " + $EnvironmentCommand.VariableValue
$WMIEnvironmentSetting = 0
EndIf

EndIf
Next
EndIf
EndIf
?
Case $type = "Get"
$WMI=GetObject("winmgmts:{impersonationLevel=impersonate}!\\$hostname\root\cimv2")
$Items=$WMI.ExecQuery("Select * from Win32_Environment Where Name = '$ENV'")
For Each $Item in $Items
? $WMIEnvironmentSetting=$Item.VariableValue
Next
EndSelect
EndFunction