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

Reboot machine rather than WinRM service? #11

Open
ChrisLGardner opened this issue Oct 18, 2018 · 4 comments
Open

Reboot machine rather than WinRM service? #11

ChrisLGardner opened this issue Oct 18, 2018 · 4 comments
Labels
discussion The issue is a discussion.

Comments

@ChrisLGardner
Copy link

Based on the discussion in this issue and the problems caused by this bug, should we be flagging the machine for a reboot as part of registering a session configuration rather than restarting the WinRM service?

In a test environment I've been effected by that bug even though I haven't changed the Path while testing the SessionConfiguration resource, rebooting the machine feels cleaner and doesn't completely stop the rest of a DSC configuration from applying if the LCM is flagged to not reboot automatically.

@johlju johlju added the discussion The issue is a discussion. label Mar 6, 2020
@devonfury
Copy link

I'd like to second this. I've been invoking the JeaSessionConfiguation resource using Chef and that fact that it restarts the WinRM service causes an error. Thankfully, it appears to be a non-terminating error. If possible, I think that it would definitely be better to simply flag for a reboot instead of restarting the WinRM service.

@raandree
Copy link

I was facing this issue in the last weeks and played with 'Unregister-PSSessionConfiguration' and 'Register-PSSessionConfiguration' a bit. It seems to me that the 'NoServiceRestart' switch is ignored most of the time and the WinRM service restarts despite 'NoServiceRestart' is present. This makes this issue pretty hard to solve.

@djwork
Copy link

djwork commented Mar 30, 2021

@raandree Tried to read through the C# I couldn't follow how NoServiceRestart is used at all in those functions

@djwork
Copy link

djwork commented Feb 15, 2022

After trying this DSC in anger, I recommend adding a RebootOnWinRMHang switch to JeaSessionConfiguation, users can then set it to true if desired

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

No branches or pull requests

5 participants