-
-
Save oliverlabs/4cde356474f86696197bb32e24ae406b to your computer and use it in GitHub Desktop.
Sample configuration to set a machine scoped environment variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.1 | |
| # Requires administrator | |
| # Checks for absences of environment variable and sets it if it's not present. | |
| properties: | |
| configurationVersion: '0.1.0' | |
| assertions: | |
| - resource: Environment | |
| directives: | |
| module: PSDscResources | |
| settings: | |
| Name: 'DSC_EXAMPLE' | |
| Ensure: 'Absent' | |
| Value: 'Desired State Configuration' | |
| Target: 'Machine' | |
| resources: | |
| - resource: Environment | |
| directives: | |
| module: PSDscResources | |
| settings: | |
| Name: 'DSC_EXAMPLE' | |
| Ensure: 'Present' | |
| Value: 'Desired State Configuration' | |
| Target: 'Machine' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment