Applies to

Call2Teams - Customers


Overview

Users may need to run PowerShell scripts for diagnostics or advance configurations.


This article explains how to ready a local device (PC) for using PowerShell.


Note: Microsoft have now upgraded their PowerShell Modules for Microsoft Teams. 


For more information click here.


Process

1. Get the latest PowerShell version from https://github.com/PowerShell/PowerShell/

2. Run PowerShell from the start menu

3 Install the Microsoft Teams Module:


Install-Module MicrosoftTeams -AllowClobber


By default, the PowerShell Gallery (PSGallery) isn't configured as a trusted repository for PowerShellGet. The first time using the PSGallery will show the following message:

Untrusted repository 
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the `Set-PSRepository` cmdlet.
Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):

Answer Yes or Yes to All to continue with the installation.


Note: The following error message that may appear:

Connect using a 365 admin account

  1. Open a Windows PowerShell command prompt window, and run the following commands:

    Import-Module MicrosoftTeams
    $sfbSession = New-CsOnlineSession
    Import-PSSession
    $sfbSession
  2. There should be an Microsoft 365 pop up in which the user will need to enter the Global 365 admin details.

  3. Once completed users will be able to run commands (Example below)

    Get-CsOnlineUser -Identity "Alex Wilber"
  4. Get a list of all users that are EnterpriseVoiceEnabled. Enter the following:

Get-CsOnlineUser | Where-Object {$_.enterprisevoiceenabled -eq "True"} |select DisplayName, UserPrincipalName| out-gridview


       5. Once a user is added to the portal and a Sync is run they should populate in this list.  If not then run another sync. 


Disclaimer

Please note Dstny Automate cannot be held responsible for the content of any third-party documentation or solution offered.