Files
PowerShell-PSDscResources/Examples/Sample_Environment_CreateNonPathVariable.ps1
T
2017-02-02 16:28:31 -08:00

26 lines
638 B
PowerShell

<#
.SYNOPSIS
Creates the environment variable 'TestEnvironmentVariable' and sets the value to 'TestValue'
both on the machine and within the process.
#>
Configuration Sample_xEnvironment_CreateNonPathVariable
{
param ()
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'
Node localhost
{
xEnvironment CreateEnvironmentVariable
{
Name = 'TestEnvironmentVariable'
Value = 'TestValue'
Ensure = 'Present'
Path = $false
Target = @('Process', 'Machine')
}
}
}
Sample_xEnvironment_CreateNonPathVariable