Creating a new ComplianceRecordingApplication in Set-CsTeamsComplianceRecordingPolicy no longer works in MicrosoftTeams powershell module 6.1.0 and higher
Starting with the MicrosoftTeams powershell module version 6.1.0 the example Set-CsTeamsComplianceRecordingPolicy from the PolicyRecordingBot sample no longer functions. The command:
Set-CsTeamsComplianceRecordingPolicy -Identity <policyIdentity> -ComplianceRecordingApplications ` @(New-CsTeamsComplianceRecordingApplication -Parent <policyIdentity> -Id <objectId>)
executes in powershell without an error displayed but if you call Get-CsTeamsComplianceRecordingApplication after running the command, a new application is not created. Similarly if you call Get-CsTeamsComplianceRecordingPolicy after running the command, no ComplianceRecordingApplications are listed for the target policy.
This behavior seems to have started in version 6.1.0 of the module and continues to fail in 6.4.0 of the module. The command works in older versions of the MicrosoftTeams powershell module. I specifically tested from version 5.5.0 to 6.0.0 while trying to find what version it started failing in.
@shawn-luna recently had an incident with MSFT and they confirmed the findings from a colleague.
(it doesn’t work)
Set-CsTeamsComplianceRecordingPolicy -Identity $policyName -ComplianceRecordingApplications @(New-CsTeamsComplianceRecordingApplication -Parent $policyName -Id $oid_1)
In the version 6.7.0 for example, this command doesn’t work, however if we use the following command now:
(works)
New-CsTeamsComplianceRecordingApplication -Parent "Tag:$policyName" -Id $oid_1
So it seems like chaining the commands does no longer works while still being written in the documentation.
https://learn.microsoft.com/en-us/microsoftteams/teams-recording-compliance#create-and-manage-your-compliance-recording-policy
I believe this should be raised at github.com/MicrosoftDocs/SkypeForBusiness then.
The command chaining is unintuitive anyways, so having a clear order of execution for users without much knowledge of PowerShell would be preferable.