Files
PowerShell-PSDscResources/Examples/Sample_Environment_CreateNonPathVariable.ps1
T
2019-04-28 18:51:33 +01:00

26 lines
618 B
PowerShell

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