Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCRetentionCompliancePolicy: TeamsChannelLocation #2600

Closed
T630Dev opened this issue Nov 28, 2022 · 1 comment · Fixed by #2610 or #2611
Closed

SCRetentionCompliancePolicy: TeamsChannelLocation #2600

T630Dev opened this issue Nov 28, 2022 · 1 comment · Fixed by #2610 or #2611
Labels
Bug Something isn't working Teams

Comments

@T630Dev
Copy link

T630Dev commented Nov 28, 2022

ISSUE DESCRIPTION (this template):

Error that TeamsChannelLocation Parameter is not known.
Error

PLEASE KEEP THE HEADERS.

Details of the scenario you tried and the problem that is occurring

Repro:

Configuration MainConfig
{
    param
    (
         [Parameter(Mandatory = $true,Position=0)][ValidateNotNull()][System.Management.Automation.PSCredential]$AdminCred
    )
    Import-DscResource -ModuleName "Microsoft365DSC"
    Node localhost
    {
                
                SCRetentionCompliancePolicy Container-107-Pol
                {
                        Comment = "Standard Aufbewahrungsrichtlinie für Microsoft Teams Chat Protokolle";
                        TeamsChatLocation = "All";
                        Enabled = $True;
                        Ensure = "Present";
                        Name = "Microsoft Teams Chat Standard Retention Policy";
                        RestrictiveRetention = $False;
                        Credential = $AdminCred;
                }
                SCRetentionComplianceRule Container-110-Rule
                {
                        RetentionComplianceAction = "KeepAndDelete";
                        ExpirationDateOption = "CreationAgeInDays";
                        RetentionDurationDisplayHint = "Days";
                        Ensure = "Present";
                        RetentionDuration = "730";
                        Policy = "Microsoft Teams Chat Standard Retention Policy";
                        Name = "Microsoft Teams Chat Standard Retention Rule";
                        Credential = $AdminCred;
                }
    }
}

Compile the Config to a MOF.
That leads to:

instance of MSFT_Credential as $MSFT_Credential1ref
{
**pwd**
};

instance of MSFT_SCRetentionCompliancePolicy as $MSFT_SCRetentionCompliancePolicy1ref
{
ResourceID = "[SCRetentionCompliancePolicy]Container-107-Pol";
 TeamsChatLocation = {
    "All"
};
 Enabled = True;
 Credential = $MSFT_Credential1ref;
 Ensure = "Present";
 Comment = "Standard Aufbewahrungsrichtlinie für Microsoft Teams Chat Protokolle";
 SourceInfo = "::11::17::SCRetentionCompliancePolicy";
 Name = "Microsoft Teams Chat Standard Retention Policy";
 ModuleName = "Microsoft365DSC";
 RestrictiveRetention = False;
 ModuleVersion = "1.22.1123.1";

 ConfigurationName = "MainConfig";

};
instance of MSFT_Credential as $MSFT_Credential2ref
{
**pwd...**

};

instance of MSFT_SCRetentionComplianceRule as $MSFT_SCRetentionComplianceRule1ref
{
ResourceID = "[SCRetentionComplianceRule]Container-110-Rule";
 ExpirationDateOption = "CreationAgeInDays";
 RetentionDurationDisplayHint = "Days";
 Ensure = "Present";
 RetentionDuration = "730";
 Policy = "Microsoft Teams Chat Standard Retention Policy";
 SourceInfo = "::21::17::SCRetentionComplianceRule";
 Name = "Microsoft Teams Chat Standard Retention Rule";
 ModuleName = "Microsoft365DSC";
 RetentionComplianceAction = "KeepAndDelete";
 Credential = $MSFT_Credential2ref;
 ModuleVersion = "1.22.1123.1";

 ConfigurationName = "MainConfig";

};
instance of OMI_ConfigurationDocument

Verbose logs showing the problem

Event Log entry:

  1. Event 4103: Auftrag {3BADC6A8-6F16-11ED-9B31-0022485B1BD5}:
    Dieses Ereignis zeigt an, dass ein Fehler ohne Abbruch ausgelöst wurde, als "Set-TargetResource" von "DSCEngine" für die DSC-Ressource "MSFT_SCRetentionCompliancePolicy" ausgeführt wurde. FullyQualifiedErrorId: NamedParameterNotFound,Set-RetentionCompliancePolicy. Fehlermeldung: A parameter cannot be found that matches parameter name 'TeamsChannelLocation'..

  2. Event 4252: Auftrag {3BADC6A8-6F16-11ED-9B31-0022485B1BD5}:
    MIResult: 1
    Fehlermeldung: A parameter cannot be found that matches parameter name 'TeamsChannelLocation'.
    Meldungs-ID: NamedParameterNotFound,Set-RetentionCompliancePolicy
    Fehlerkategorie: 5
    Fehlercode: 5
    Fehlertyp: MI

  3. Event 4097: Auftrag {3BADC6A8-6F16-11ED-9B31-0022485B1BD5}:
    Dieses Ereignis gibt an, dass bei der Konfigurationsverarbeitung durch "LCM" ein Fehler auftritt. Fehler-ID: 0x1. Fehlerdetails: The SendConfigurationApply function did not succeed.. Ressourcen-ID: [SCRetentionCompliancePolicy]Container-107-Pol. Quelleninformationen: ::11::17::SCRetentionCompliancePolicy. Fehlermeldung: The PowerShell DSC resource '[SCRetentionCompliancePolicy]Container-107-Pol' with SourceInfo '::11::17::SCRetentionCompliancePolicy' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details..

  4. Event 4252: Auftrag {3BADC6A8-6F16-11ED-9B31-0022485B1BD5}:
    MIResult: 1
    Fehlermeldung: The PowerShell DSC resource '[SCRetentionCompliancePolicy]Container-107-Pol' with SourceInfo '::11::17::SCRetentionCompliancePolicy' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
    Meldungs-ID: NonTerminatingErrorFromProvider
    Fehlerkategorie: 7
    Fehlercode: 1
    Fehlertyp: MI

  5. Event 4252: Auftrag {3BADC6A8-6F16-11ED-9B31-0022485B1BD5}:
    MIResult: 1
    Fehlermeldung: The SendConfigurationApply function did not succeed. LCM failed to start desired state configuration manually.
    Meldungs-ID: MI RESULT 1
    Fehlerkategorie: 0
    Fehlercode: 1
    Fehlertyp: MI

Suggested solution to the issue

na

Version of the DSC module that was used ('dev' if using current dev branch)

see ps config code

@T630Dev
Copy link
Author

T630Dev commented Dec 1, 2022

Ressource was fixed and tested OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Teams
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants