mirror of
https://github.com/PowerShell/PSDscResources
synced 2026-06-21 13:45:29 +00:00
26 lines
618 B
PowerShell
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
|