SOLVED

Set up for webinars in Microsoft Teams

Copper Contributor

Hi

 

I'm reading this page:
Set up for webinars in Microsoft Teams - Microsoft Teams | Microsoft Docs

and I'm struggling to get the samples to work.

I've installed MicrosoftTeams PowerShell module version 2.3.1.

When I run Connect-MicrosoftTeams it opens the browser and I get navigated to localhost after login with the message "ERR_CONNECTION_REFUSED".

I then run the cmdlet "Set-CsTeamsMeetingPolicy -AllowPrivateMeetingScheduling $True" it returns the error:

Get-CsOnlineSession: C:\*\SfBORemotePowershellModule.psm1:63
Line |
63 | $remoteSession = & (Get-CsOnlineSessionCommand)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Run Connect-MicrosoftTeams before running cmdlets.

Invoke-Command: C:\*\SfBORemotePowershellModule.psm1:52363
Line |
52363 | … -Session (Get-PSImplicitRemotingSession -CommandName 'Set-CsTeamsM …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
| that is not null or empty, and then try the command again.

 

I did notice this issue here in the forums:

Authenticating with an access token Connect-MicrosoftTeams - Microsoft Tech Community

 

But I'm happy with just using the UI to authenticate as I'm just trying to run this setting as it's not available in the Admin UI.

 

Any ideas?

5 Replies
Have you tried to update the module or didn’t run powershell as administrator? The last one is easy to forget and can cause trouble

Adam

@adam deltinger 

Hi, as mentioned I'm running the latest version of the Microsoft Teams Powershell Module.

Also, I didn't forget to run Powershell as an administrator 🙂

 

Regards,

Oskar

Could you please uninstall sfb online connecter. Please go through this link.https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-move-from-sfbo
Then update teams powershell module.
best response confirmed by oskarjf (Copper Contributor)
Solution
Hi, I found the problem. I was running Powershell v7 but when I ran these commands in v5 it worked fine.

@oskarjf 

Are you running this on corporate network where you are having proxy in use? If so, then quite normal security policy says: administrator accounts must not have internet access.

 

And even earlier mentioned, Microsoft Teams module does not require run as administrator privileged to be working.

 

So try with your regular account. Also, have you confirmed the module is correct:

Get-Module -ListAvailable MicrosoftTeams

1 best response

Accepted Solutions
best response confirmed by oskarjf (Copper Contributor)
Solution
Hi, I found the problem. I was running Powershell v7 but when I ran these commands in v5 it worked fine.

View solution in original post