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
ISSUE DESCRIPTION (this template):
The retention rule is related to a corresponding retention policy. (via the Policy attribute in the rule)
When the rentention policy test method returns true, the related rule change in the same MOF works fine.
However, when I do a policy change (for example change the comment String) and afterwards I want to change the rule (i.e ExpirationDateOption), I receive an error message saying that the related policy is still being deployed and cannot be changed.
If I then wait and start the same DSC configuration again (Start-DSCConfiguration), the policy ressource returns true and then also the rule works. This is for our use case not ok as the DSC run needs to succeed on the first run.
Details of the scenario you tried and the problem that is occurring
Verbose logs showing the problem
PreReq: The related policy to the rule must be changed in the same run. Test method returns false (as expected)
The rule test method returns false (as expected) but then throws the error:
Suggested solution to the issue
na since in constrast to the policy, the underlying ps cmdlet for the rule has no force parameter.
Maybe the set method of the rule needs to check the state of the policy and then delay the change to the rule?
Also worth reporting this to the product group why we cannot change the rule and it needs to wait for the policy while in the policy itself, they implemented the force option.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
ConfigurationMainConfig
{
param
(
[Parameter(Mandatory=$true,Position=0)][ValidateNotNull()][System.Management.Automation.PSCredential]$AdminCred
)
Import-DscResource-ModuleName "Microsoft365DSC"
Node localhost
{
SCRetentionCompliancePolicy 'RetentionCompliancePolicyEXO-106'
{
Name ="Exchange Online Standard Retention Policy for DemoTenant";
Comment ="Standard Aufbewahrungsfrist für Exchange Online 93 Tage inkl. M365Groups DEMO";
RestrictiveRetention =$False;
ModernGroupLocation ="All";
ExchangeLocation ="All";
Ensure ="Present";
Enabled =$False;
Credential =$AdminCred;
}
SCRetentionComplianceRule 'RetentionComplianceRuleEXO-109'
{
Name ="Exchange Online Standard Retention Rule for DemoTenant";
Policy ="Exchange Online Standard Retention Policy for DemoTenant";
ExpirationDateOption ="ModificationAgeInDays";
RetentionDurationDisplayHint ="Days";
RetentionComplianceAction ="Keep";
Ensure ="Present";
RetentionDuration ="93";
Credential =$AdminCred;
}
}
}
The operating system the target node is running
The operating system the target node is running
OsName : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-Bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US, de-DE}
Version of the DSC module that was used ('dev' if using current dev branch)
1.22.1221.1
The text was updated successfully, but these errors were encountered:
NikCharlebois
added a commit
to NikCharlebois/Microsoft365DSC
that referenced
this issue
Jan 4, 2023
ISSUE DESCRIPTION (this template):
The retention rule is related to a corresponding retention policy. (via the Policy attribute in the rule)
When the rentention policy test method returns true, the related rule change in the same MOF works fine.
However, when I do a policy change (for example change the comment String) and afterwards I want to change the rule (i.e ExpirationDateOption), I receive an error message saying that the related policy is still being deployed and cannot be changed.
If I then wait and start the same DSC configuration again (Start-DSCConfiguration), the policy ressource returns true and then also the rule works. This is for our use case not ok as the DSC run needs to succeed on the first run.
Details of the scenario you tried and the problem that is occurring
Verbose logs showing the problem
PreReq: The related policy to the rule must be changed in the same run. Test method returns false (as expected)
The rule test method returns false (as expected) but then throws the error:
Suggested solution to the issue
na since in constrast to the policy, the underlying ps cmdlet for the rule has no force parameter.
Maybe the set method of the rule needs to check the state of the policy and then delay the change to the rule?
Also worth reporting this to the product group why we cannot change the rule and it needs to wait for the policy while in the policy itself, they implemented the force option.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
The operating system the target node is running
OsName : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-Bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US, de-DE}
Version of the DSC module that was used ('dev' if using current dev branch)
1.22.1221.1
The text was updated successfully, but these errors were encountered: