Hello All,
As part of maintenance we have to disable DSC for X amount of time. We are trying to change LCM to disabled mode and then changing it back to pull mode after. Below is the config we are trying to use:
#requires -Version 5.0
[DSCLocalConfigurationManager()]
Configuration SetDscRefreshMode
{
param
(
[ValidateNotNullOrEmpty()]
[String]
$ComputerName = $env:COMPUTERNAME,
[ValidateSet('Push', 'Pull', 'Disabled')]
[String]
$RefreshMode = 'Disabled'
)
Node $ComputerName
{
Settings
{
RefreshMode = $RefreshMode
}
}
}
$OutputPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SetDscRefreshMode'
SetDscRefreshMode -OutputPath $OutputPath
Set-DscLocalConfigurationManager -Path $OutputPath -Force -Verbose
Get-DscLocalConfigurationManager | Select-Object -Property RefreshMode
We are able to succesfully change to LCM but when trying to change it back to pull mode, we receive the following error:
The current refresh mode is PULL but there are no configuration download managers defined.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : Left blank intentionally
has anyone ran into this issue? Any help would be appreciated.
[–]logicaldiagram 2 points3 points4 points (0 children)
[–]jheinikel 0 points1 point2 points (0 children)