Desired State Configuration Manager Caching Custom Resource Scripts


it seems dsc somehow caching custom resource scripts.

repro steps:

  1. add custom dsc resource
  2. run start-dscconfiguration exercise new resource
  3. modify the resource in c:\windows\system32\windows powershell\.. (adding write-verbose statements example)
  4. run start-dscconfiguration again
  5. 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

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client