Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

How to force a PowerShell DSC client to refresh configuration from pull server

While testing DSC (Desired State Configuration) Pull method on client, I had to forcefully refresh configuration from pull many times, as I could not wait for 30 Mins of frequency time to apply the changes. Below cmdlet helps to refresh configuration immediately. This command need to run as an Administrator. Also before forcing settings I removed previous configuration manually by removing TempFolder from C drive and CustomApp environment variable. In the verbose message I see it is identifying missing configuration and getting it applied, if applicable.

Start-DscConfiguration –UseExisting –Verbose –Wait

Powershell dsc, desired state configuration, start-dscconfiguration -useexisting, microsoft server 2016, pull dsc server push mode dsc

Basically this command is running and executing below CIM method in the background, And this oneliner is also an alternative to above command.

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

Useful Blogs
Part 1: Build your first Microsoft PowerShell DSC pull server
Part 2: Generate target server node config for PowerShell DSC pull server
Part 3: Configure PowerShell DSC Local configuration manager LCM in pull mode and update configuration
How to force a PowerShell DSC client to refresh configuration from pull server

Go Back

Comment

Blog Search

Page Views

1073796

Follow me on Blogarama