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

Long execution time due to function [System.Environment]::SetEnvironmentVariable(). #363

Open
pkotov87 opened this issue Jan 29, 2025 · 0 comments

Comments

@pkotov87
Copy link

Hello,

Hello everyone,

We have noticed that when puppet runs on Windows under SYSTEM, we experience delays in the DSC modules.

The analysis showed that it is due to the function [System.Environment]::SetEnvironmentVariable(). On several servers, this function takes more than 1 minute (twice per run).

This problem is related to the topic:
https://stackoverflow.com/questions/4825967/environment-setenvironmentvariable-takes-a-long-time-to-set-a-variable-at-user-o

When we switched to the Set-ItemProperty method, all DSC resources ran faster than 1 second.

Could you please switch the code to this method as well, so that the puppet runs are faster?

Regards,
Paul

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

1 participant