Desired State Configuration Manager Caching Custom Resource Scripts
it seems dsc somehow caching custom resource scripts.
repro steps:
- add custom dsc resource
- run start-dscconfiguration exercise new resource
- modify the resource in c:\windows\system32\windows powershell\.. (adding write-verbose statements example)
- run start-dscconfiguration again
- the new write-verbose statements not executed
if reboot computer, see write-verbose statements executed.
feels i'm missing obvious...
craigmartin – edgile, inc. – http://identitytrench.com
received on offline, bringing answer thread:
"dsc runs in wmi provider host process (wmiprvse). there many instances of wmiprvse running. in order find out in of these dsc engine hosted, can (below). this list process id of wmiprvse hosting dsc engine. in order update provider, need kill wmiprvse process , begin again."
### ### find process hosting dsc engine ### $dscprocessid = get-wmiobject msft_providers | where-object {$_.provider -like 'dsccore'} | select-object -expandproperty hostprocessidentifier ### ### kill ### get-process -id $dscprocessid | stop-process
craigmartin – edgile, inc. – http://identitytrench.com
Windows Server > Windows PowerShell
Comments
Post a Comment