The term 'New-CsTeamsComplianceRecordingPolicy' is not recognized

Copper Contributor

I am creating Policy Recording Bot in Microsoft Teams as per the below URL
https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/Loca...

I have created bot in Azure.
I am able to create Application instance using below powershell command
New-CsOnlineApplicationInstance -UserPrincipalName <upn@contoso.com> -DisplayName <displayName> -ApplicationId <your_botappId>

Now working on creating Recording Policy with the below command in Powershell

New-CsTeamsComplianceRecordingPolicy -Enabled $true -Description "Test policy created by <yourName>" <policyIdentity>

But while executing this command getting following message -

The term 'New-CsTeamsComplianceRecordingPolicy' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
+ CategoryInfo : ObjectNotFound: (New-CsTeamsComplianceRecordingPolicy:String) [], CommandNotFoundExcepti
on
+ FullyQualifiedErrorId : CommandNotFoundException
+ PSComputerName : api.interfaces.records.teams.microsoft.com


I have installed powershell version 2.3.1 of Microsoft Teams. Also "New-CsTeamsComplianceRecordingPolicy" this command exists in the module "MicrosoftTeams".

Could you please assist.

3 Replies
Hello, any difference if you import the module to the session?

No. In the Import Module the command -New-CsTeamsComplianceRecordingPolicy is exists. But While executing it gives error.

Well, the message says it's not available for use as it cannot be found. I would probably start over, remove and reinstall.