You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to remove a Key/Value pair from a file, the Key/Value pair is not removed
Verbose logs
Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
PerformRequiredConfigurationChecks,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
An LCM method call arrived from computer SERVER1 with user sid {SID}.
[SERVER1]: [] Executing Get-Action with configuration (null)'s checksum:
5650263B30602B97769572C32951366FD4A3A2DA0AE1886205F3F1E73E727F3E.
[SERVER1]: [] Executing Get-Action with configuration 's checksum returned result
status: GetConfiguration.
[SERVER1]: [] Checksum is different. LCM will execute GetConfiguration to pull
configuration .
[SERVER1]: [] Executing GetConfiguration succeeded. Configuration was pulled from
server.
[SERVER1]: [] Applying the new configuration(s) pulled.
[SERVER1]: LCM: [ Start Resource ] [[MsiPackage]InstallZabbix609]
[SERVER1]: LCM: [ Start Test ] [[MsiPackage]InstallZabbix609]
[SERVER1]: [[MsiPackage]InstallZabbix609] Parsing
{020E0A73-C192-4D8C-AF6A-7986F7D26F69} as an identifyingNumber
[SERVER1]: [[MsiPackage]InstallZabbix609] Parsed
{020E0A73-C192-4D8C-AF6A-7986F7D26F69} as {020E0A73-C192-4D8C-AF6A-7986F7D26F69}
[SERVER1]: [[MsiPackage]InstallZabbix609] The package Zabbix Agent 2 (64-bit) is
installed
[SERVER1]: LCM: [ End Test ] [[MsiPackage]InstallZabbix609] in 0.0470 seconds.
[SERVER1]: LCM: [ Skip Set ] [[MsiPackage]InstallZabbix609]
[SERVER1]: LCM: [ End Resource ] [[MsiPackage]InstallZabbix609]
[SERVER1]: LCM: [ Start Resource ] [[KeyValuePairFile]ZabbixHostnameRemoved]
[SERVER1]: LCM: [ Start Test ] [[KeyValuePairFile]ZabbixHostnameRemoved]
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameRemoved] Searching for key 'Hostname' in
file 'C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf'.
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameRemoved] Key 'Hostname' not found in file
'C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf' and should not exist. Change not required.
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameRemoved] File encoding is set to 'UTF8'
but should be set to 'ASCII', Change required.
[SERVER1]: LCM: [ End Test ] [[KeyValuePairFile]ZabbixHostnameRemoved] in 0.0940 seconds.
[SERVER1]: LCM: [ Start Set ] [[KeyValuePairFile]ZabbixHostnameRemoved]
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameRemoved] Searching for key 'Hostname' in
file 'C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf'.
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameRemoved] File encoding is set to 'UTF8'
but should be set to 'ASCII', Change required.
[SERVER1]: LCM: [ End Set ] [[KeyValuePairFile]ZabbixHostnameRemoved] in 0.3860 seconds.
[SERVER1]: LCM: [ End Resource ] [[KeyValuePairFile]ZabbixHostnameRemoved]
[SERVER1]: LCM: [ Start Resource ] [[KeyValuePairFile]ZabbixHostnameItem]
[SERVER1]: LCM: [ Start Test ] [[KeyValuePairFile]ZabbixHostnameItem]
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameItem] Searching for key 'HostnameItem' in
file 'C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf'.
[SERVER1]: [[KeyValuePairFile]ZabbixHostnameItem] Key 'HostnameItem' found in file
'C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf' and should exist and value(s) are correct. Change not required.
[SERVER1]: LCM: [ End Test ] [[KeyValuePairFile]ZabbixHostnameItem] in 0.0310 seconds.
[SERVER1]: LCM: [ Skip Set ] [[KeyValuePairFile]ZabbixHostnameItem]
[SERVER1]: LCM: [ End Resource ] [[KeyValuePairFile]ZabbixHostnameItem]
[SERVER1]: LCM: [ Start Resource ] [[Service]ZabbixAgentIsRunning]
[SERVER1]: LCM: [ Start Test ] [[Service]ZabbixAgentIsRunning]
[SERVER1]: [[Service]ZabbixAgentIsRunning] Service Zabbix Agent 2 exists.
[SERVER1]: [[Service]ZabbixAgentIsRunning] Perform operation 'Query CimInstances'
with following parameters, ''queryExpression' = SELECT * FROM Win32_Service WHERE Name='Zabbix Agent 2','queryDialect'
= WQL,'namespaceName' = root\cimv2'.
[SERVER1]: [[Service]ZabbixAgentIsRunning] Operation 'Query CimInstances' complete.
[SERVER1]: [[Service]ZabbixAgentIsRunning] Service Zabbix Agent 2 exists.
[SERVER1]: LCM: [ End Test ] [[Service]ZabbixAgentIsRunning] in 0.4530 seconds.
[SERVER1]: LCM: [ Skip Set ] [[Service]ZabbixAgentIsRunning]
[SERVER1]: LCM: [ End Resource ] [[Service]ZabbixAgentIsRunning]
Operation 'Invoke CimMethod' complete.
Time taken for configuration job to complete is 44.289 seconds
Problem description
When attempting to remove a Key/Value pair from a file, the Key/Value pair is not removed
Verbose logs
DSC configuration
Suggested solution
The Regex is searching for an EOL Character that doesn't exist.
On line 264 of DSC_KeyValuePairFile.psm1, the regex is requiring $eolChars to exist. This is in contrast to line 242, which is looking for 0 or more matches to $eolChars.
On line 264, change:
to:
Operating system the target node is running
PowerShell version and build the target node is running
FileContentDsc version
The text was updated successfully, but these errors were encountered: