SOLVED

Set up for webinars in Microsoft Teams

%3CLINGO-SUB%20id%3D%22lingo-sub-2439706%22%20slang%3D%22en-US%22%3ESet%20up%20for%20webinars%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2439706%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20reading%20this%20page%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fset-up-webinars%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESet%20up%20for%20webinars%20in%20Microsoft%20Teams%20-%20Microsoft%20Teams%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3CP%3Eand%20I'm%20struggling%20to%20get%20the%20samples%20to%20work.%3C%2FP%3E%3CP%3EI've%20installed%20MicrosoftTeams%20PowerShell%20module%20version%202.3.1.%3C%2FP%3E%3CP%3EWhen%20I%20run%26nbsp%3BConnect-MicrosoftTeams%20it%20opens%20the%20browser%20and%20I%20get%20navigated%20to%20localhost%20after%20login%20with%20the%20message%20%22%3CSPAN%3EERR_CONNECTION_REFUSED%22.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20then%20run%20the%20cmdlet%20%22Set-CsTeamsMeetingPolicy%20-AllowPrivateMeetingScheduling%20%24True%22%20it%20returns%20the%20error%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EGet-CsOnlineSession%3A%20C%3A%5C*%5CSfBORemotePowershellModule.psm1%3A63%3CBR%20%2F%3ELine%20%7C%3CBR%20%2F%3E63%20%7C%20%24remoteSession%20%3D%20%26amp%3B%20(Get-CsOnlineSessionCommand)%3CBR%20%2F%3E%7C%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%7C%20Run%20Connect-MicrosoftTeams%20before%20running%20cmdlets.%3C%2FP%3E%3CP%3EInvoke-Command%3A%20C%3A%5C*%5CSfBORemotePowershellModule.psm1%3A52363%3CBR%20%2F%3ELine%20%7C%3CBR%20%2F%3E52363%20%7C%20%E2%80%A6%20-Session%20(Get-PSImplicitRemotingSession%20-CommandName%20'Set-CsTeamsM%20%E2%80%A6%3CBR%20%2F%3E%7C%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%7C%20Cannot%20validate%20argument%20on%20parameter%20'Session'.%20The%20argument%20is%20null%20or%20empty.%20Provide%20an%20argument%3CBR%20%2F%3E%7C%20that%20is%20not%20null%20or%20empty%2C%20and%20then%20try%20the%20command%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20notice%20this%20issue%20here%20in%20the%20forums%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fteams-developer%2Fauthenticating-with-an-access-token-connect-microsoftteams%2Fm-p%2F2233794%22%20target%3D%22_blank%22%3EAuthenticating%20with%20an%20access%20token%20Connect-MicrosoftTeams%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I'm%20happy%20with%20just%20using%20the%20UI%20to%20authenticate%20as%20I'm%20just%20trying%20to%20run%20this%20setting%20as%20it's%20not%20available%20in%20the%20Admin%20UI.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2439706%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2442031%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20up%20for%20webinars%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2442031%22%20slang%3D%22en-US%22%3EHave%20you%20tried%20to%20update%20the%20module%20or%20didn%E2%80%99t%20run%20powershell%20as%20administrator%3F%20The%20last%20one%20is%20easy%20to%20forget%20and%20can%20cause%20trouble%20%3CBR%20%2F%3E%3CBR%20%2F%3EAdam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2444118%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20up%20for%20webinars%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2444118%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F72542%22%20target%3D%22_blank%22%3E%40adam%20deltinger%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20as%20mentioned%20I'm%20running%20the%20latest%20version%20of%20the%20Microsoft%20Teams%20Powershell%20Module.%3C%2FP%3E%3CP%3EAlso%2C%20I%20didn't%20forget%20to%20run%20Powershell%20as%20an%20administrator%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EOskar%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional 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 (Occasional 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