Issue extracting "TeamsUpgradePolicy".
LOG.txt Hi there,
We are trying to extract "TeamsUpgradePolicy" from our tenant, and it keeps returning the error mentioned below. We've tried on two separate machines, multiple times using GA accounts. At the same time, we've also tried a downgrade to version 1.21.317.1. We are using PIM to enable GA, and GA active time is 2 hours. PS window is run-as-admin.
PS C:\windows\system32> Export-M365DSCConfiguration -Quiet -ComponentsToExtract @('TeamsUpgradePolicy') -GlobalAdminAccount (get-credential) -Verbose
The errors do not always start at step 9/10 or 10/10. We have also seen them at 7/10. Something that stands out is that it looks to be always around the 1 hour mark (3600+ seconds). Guidance would be greatly appreciated as we are trying to move forward.
VERBOSE:
Name Value
---- -----
Identity SfBWithTeamsCollab
GlobalAdminAccount System.Management.Automation.PSCredential
VERBOSE: GlobalAdminAccount was specified. Connecting via User Principal
Processing data for a remote command failed with the following error message: The WinRM client cannot process the request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in the service configuration. Verify the unencrypted traffic setting in
the service configuration or specify one of the authentication mechanisms supported by the server. To use Kerberos, specify the computer name as the remote destination. Also verify that the client computer and the destination computer are joined to a domain. To use Basic, specify the computer name as the remote
destination, specify Basic authentication and provide user name and password. Possible authentication mechanisms reported by server: For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OperationStopped: (api.interfaces....s.microsoft.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName : api.interfaces.records.teams.microsoft.com
✅
|---[8/10] SfBWithTeamsCollabWithNotifyVERBOSE: Attempting connection to {SkypeForBusiness} with:
VERBOSE:
Name Value
---- -----
Identity SfBWithTeamsCollabWithNotify
GlobalAdminAccount System.Management.Automation.PSCredential
VERBOSE: GlobalAdminAccount was specified. Connecting via User Principal
Starting a command on the remote server failed with the following error message : The WinRM client cannot process the request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in the service configuration. Verify the unencrypted traffic setting
in the service configuration or specify one of the authentication mechanisms supported by the server. To use Kerberos, specify the computer name as the remote destination. Also verify that the client computer and the destination computer are joined to a domain. To use Basic, specify the computer name as the
remote destination, specify Basic authentication and provide user name and password. Possible authentication mechanisms reported by server: For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OperationStopped: (api.interfaces....s.microsoft.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName : api.interfaces.records.teams.microsoft.com
⌛ Export took {3625 seconds}
Can you check your WinRM settings. Or do a WinRM quickconfig. Either basic authentication is not enabled, or you don't allow unencrypted traffic.
Are you able to export other workloads without a problem?
Thank you for the suggestion, but this did not solve the issue. Basic authentication was already enabled and enabling "AllowUnencrypted" did not change its behavior. Other workloads work just fine so far. This appears the only one to constantly terminate with above mentioned errors.
Since you state that it's always around the 1 hour mark, I suspect the Teams/SfB PowerShell session timeout. That time-out is around 1 hour. This can be solved by running the following PowerShell command after the import of the session: Enable-CsOnlineSessionForReconnection
Can you try to setup the PowerShell session to Teams with the additional command, before Exporting the configuration
we fixed it just with this workaround:
https://get-itips.capazero.net/posts/s4b-reconnect-teams
the problem ist that in the version currently used in m365dsc the Enable-CsOnlineSessionForReconnection is not available but in newest teams module New-CsOnlineSession should not be required anymore? just use Connect-MicrosoftTeams?
so is there a plan to upgrade the m365dsc code to the newest version? as far as i can see then also the refresh is not required anymore...
but as a manual workaround for all oeple having the same problem:
- the nice script from andres fixes the export error temporary.
The module was updated to the latest Teams dependencies a few months back. Closing the issue.