PowerShell DSC brings together and pushes

I am using PowerShell 4.0 and have configured DSC Pull Server. Few clients are connected to the Pull Server and are getting the correct configurations. Below is the LCM data on the client machine:  enter image description here

However, sometimes we would like to customize the configuration for these clients. When I try to push it is successful and the RefershMode is changed to PUSH and all other settings are the same as they were before. Now from now on I no longer get the configuration from the Pull server. Again I needed to switch the mode to PUSH and it works great.

Can both Pull and Push modes be configured on the same client computer? Will they work together?

Thank you for your help!

+3


source to share


1 answer


No, these modes cannot exist on the same machine; it's one or the other.

I have to ask the question why you would like to do this. Presumably if the machine is already in a Pull configuration then the configuration you want to push to it should be different from the configuration on the Pull server. If so, why would you want to revert to Pull, which completely obscures the Push configuration?

Based on your comment, I would recommend changing the server Pull configuration for node (s) when you want to make changes. The process of creating MOF and checksum files and then copying them to the Pull Server can be automated. Then you can use:



Invoke-CimMethod -Namespace root/Microsoft/Windows/DesiredStateConfiguration –ClassName MSFT_DSCLocalConfigurationManager -MethodName PerformRequiredConfigurationChecks -Arg @{Flags = [System.UInt32]1 } -ComputerName $targetNode 

      

to force Node to pull and reapply the config.

+2


source







All Articles