EnvironmentUtility.SetEnvironmentVariable Method

This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.Platform
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)

Usage

'Usage
Dim name As String
Dim value As String

EnvironmentUtility.SetEnvironmentVariable(name, value)

Syntax

'Declaration
Public Shared Sub SetEnvironmentVariable ( _
    name As String, _
    value As String _
)
public static void SetEnvironmentVariable (
    string name,
    string value
)
public:
static void SetEnvironmentVariable (
    String^ name, 
    String^ value
)
public static void SetEnvironmentVariable (
    String name, 
    String value
)
public static function SetEnvironmentVariable (
    name : String, 
    value : String
)

Parameters

  • name
  • value

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

EnvironmentUtility Class
EnvironmentUtility Members
Microsoft.OneGet.Utility.Platform Namespace