PSDesiredStateConfiguration icon indicating copy to clipboard operation
PSDesiredStateConfiguration copied to clipboard

Invoke-DSCResource requires to exit powershell session to read any changes to powershell resource

Open bagajjal opened this issue 3 years ago • 0 comments

I'm using 7.2.0-preview.6.

Repro steps -

  1. Have a test powershell resource that's working fine.
  2. inside powershell session, run invoke-dscresource
  3. Now add a write-verbose / write-host / write-debug statement in the execution flow.
  4. in the same powershell session, run invoke-dscresource again.
  5. You wouldn't see the log added in step 3

To see the log added in step 3, you need to completely exit the powershell session and launch powershell session again.

Invoke-DscResource doesn't see the latest changes unless I completely exit the powershell session. This makes developer life very difficult to debug.

As far as I remember, this scenario worked before DSC code is pulled from powershell repository.

bagajjal avatar Sep 14 '21 00:09 bagajjal