Forum Discussion

AB21805's avatar
AB21805
Bronze Contributor
Apr 27, 2020

Importing users into meeting policy

Hi all, 

 

Im struggling to import bulk users into a meeting policy, I believe you have to use powershell install module (which iv done) and connect to Skype for business however when I use the following commands: 

 

Import-Module SkypeOnlineConnector
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession

 

I get this error? 

Get-CsOnlinePowerShellEndpoint : There is an error in XML document (3, 2).

At C:\Program Files\Common Files\Skype for Business

Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1 

 

PLEASE HELP!

25 Replies

  • AB21805 

     

    Or, try this command to connect to PowerShell instead;

     

    Import-Module SkypeOnlineConnector
    $Cred = Get-Credential
    $Session = New-CSOnlineSession -credential $Cred -OverrideAdminDomain “tenantname.onmicrosoft.com”
    • AB21805's avatar
      AB21805
      Bronze Contributor

      Hi PeterRising

       

      I didn't get any errors so thank you but I seem to not be able to run this to test if Im connected: 

       

      Get-CsOnlineUser -Filter {TeamsMessagingPolicy -eq ‘Test'} | Select UserPrincipalName

       

      I get the following error: 

      Get-CsOnlineUser : The term 'Get-CsOnlineUser' 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.

       

      Any Ideas? 

      • AB21805 

         

        Try adding this command in;

         

        Import-PSSession $session -AllowClobber -Verbose

         

        Then run Get-CsOnlineUser cmd again.

  • AB21805 

     

    You can do this in bulk via the Teams Admin Center.  How many users are you needing to do this for?  If it's no more than say 20, then the Admin Center is your best bet to update in bulk.