I started a remote session from VM host(desktop) to the guest VM having a Nano server(preview 5). I would like to update the PATH variable and make it effect machine wide(example: to put dotnet.exe
in PATH to enable running portable apps). What I am noticing is that the SetEnvironmentVariable
overload doesn't have the overload which takes in the target(like 'User', 'Machine' etc.).
If you notice I have the overload in my host's Powershell (the version is a bit older than the Nano server one) but not on the Nano server's one.
What am I missing?
This is due to the fact that Nano server uses a stripped down version of .NET called .NET Core. (More info on MSDN.)
The documentation for the Core implementation of SetEnvironmentVariable
is available here.
EDIT 26 Sept 2017:
This answer applied to .NET Core 1.x. In .NET Core 2.0, the overload the OP was looking for has been added. The documentation for 2.0 is here.