PSDesiredStateConfiguration
PSDesiredStateConfiguration copied to clipboard
Invoke-DSCResource requires to exit powershell session to read any changes to powershell resource
I'm using 7.2.0-preview.6.
Repro steps -
- Have a test powershell resource that's working fine.
- inside powershell session, run invoke-dscresource
- Now add a write-verbose / write-host / write-debug statement in the execution flow.
- in the same powershell session, run invoke-dscresource again.
- 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.