Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to switch between user, path and machine context for configuring path variable #3

Open
andy1547 opened this issue Jun 18, 2017 · 1 comment

Comments

@andy1547
Copy link

andy1547 commented Jun 18, 2017

This one is fairly self explanatory, just involves adding a context parameter using a validation set, defaults to machine if nothing is specified.

@jasonmcboyd
Copy link
Owner

Just have to keep in mind that the DSC local configuration manager (LCM) runs under the System account, not the account of the user that called Start-DscConfiguration. So it is the System account's 'Path' variable that will be updated. There is the the 'PsDscRunAsCredential' parameter (I don't know what version of PowerShell that parameter was introduced in) that does allow for resources to be configured under a different account on a case by case basis. In fact, you can probably assume that if the 'PsDscContext' variable is present (it will be if a value was passed for the PsDscRunAsCredential parameter) inside the function that the function should target the user environment rather than the machine environment obviating the need for a switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants