VoIP:Teams:Powershell: Difference between revisions
From VTX Public Wiki
(Add a new page for Powershell Management) |
(Info about to install MicrosoftTeams module) |
||
Line 19: | Line 19: | ||
=== MicrosoftTeams Module === |
=== MicrosoftTeams Module === |
||
{{Warning|1=This new powershell module MicrosoftTeams is known to have problem with Powershell version 7, please use OS embedded version 5.1 !}} |
|||
* '''Information''': Microsoft is slowly replacing Skype for Business Online Powershell module with a new one MicrosoftTeams. This new module includes the same connection modules with some additional commands dedicated for Teams. https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install |
|||
==== MicrosoftTeams : Install the module ==== |
|||
{{Warning|1=Do not use Powershell version 7, use embedded version 5.1}} |
|||
* '''Problematic''': You would like to install the MicrosoftTeams powershell module |
|||
* '''Additional Information''' : please refer to https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install |
|||
* '''Solution''': Follow the procedure below |
|||
# Open Start menu and search "powershell" ( click the small Arrow to open it in Administrator mode ) Make sure to run the embedded version |
|||
# Use the powershell commands below to install the module "Install-Module MicrosoftTeams" |
|||
# Accept to install the module from Powershell PSRepository |
|||
<table> |
|||
<tr><td> |
|||
[[Image:FAQ-Teams-Powershell-Admin-Mode.png|thumb|600px|left|Start Powershell in Administrator mode]] |
|||
</td></tr> |
|||
</table> |
|||
<source lang="powershell"> |
|||
PS C:\WINDOWS\system32> Install-Module MicrosoftTeams |
|||
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"): Y |
|||
PS C:\WINDOWS\system32> Get-Module -ListAvailable MicrosoftTeams |
|||
Directory: C:\Program Files\WindowsPowerShell\Modules |
|||
ModuleType Version Name ExportedCommands |
|||
---------- ------- ---- ---------------- |
|||
Binary 1.1.6 MicrosoftTeams {Add-TeamUser, Connect-MicrosoftTeams, Disconnect-Microsof... |
|||
</source> |
|||
==== MicrosoftTeams : What is the installed version of the module ==== |
|||
* '''Problematic''' : You would like to know which version of MicrosoftTeams you are running |
|||
* '''Solution''': Use the command below "Get-Module -ListAvailable MicrosoftTeams" |
|||
* '''Additional Information''': You can verify the changelog of the version in https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes |
|||
<source lang="powershell"> |
|||
PS C:\WINDOWS\system32> Get-Module -ListAvailable MicrosoftTeams |
|||
Directory: C:\Program Files\WindowsPowerShell\Modules |
|||
ModuleType Version Name ExportedCommands |
|||
---------- ------- ---- ---------------- |
|||
Binary 1.1.6 MicrosoftTeams {Add-TeamUser, Connect-MicrosoftTeams, Disconnect-Microsof... |
|||
</source> |
|||
==== MicrosoftTeams : Update the module to last version ==== |
|||
* '''Problematic''': You have see that there is a new powershell MicrosoftTeams module in https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes and you would like to install it |
|||
* '''Solution''': Follow the procedure below |
|||
# Open Start menu and search "powershell" ( click the small Arrow to open it in Administrator mode ) Make sure to run the embedded version |
|||
# Use the powershell commands below to remove the module "Update-Module MicrosoftTeams" |
|||
<source lang="powershell"> |
|||
PS C:\WINDOWS\system32> Update-Module MicrosoftTeams |
|||
</source> |
|||
==== MicrosoftTeams : Uninstall the module ==== |
|||
* '''Problematic''': You would like to uninstall the MicrosoftTeams powershell module |
|||
* '''Additional Information''' : please refer to https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install |
|||
* '''Solution''': Follow the procedure below |
|||
# Open Start menu and search "powershell" ( click the small Arrow to open it in Administrator mode ) Make sure to run the embedded version |
|||
# Use the powershell commands below to remove the module "Uninstall-Module MicrosoftTeams" |
|||
<source lang="powershell"> |
|||
PS C:\WINDOWS\system32> Uninstall-Module MicrosoftTeams |
|||
</source> |
|||
Revision as of 13:45, 24 November 2020
Powershell version[edit | edit source]
Powershell 7 is known to have problem with MicrosoftTeams module, please prefer to use embedded Powershell version 5.1 by default, cf https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install |
What is my Powershell version ?[edit | edit source]
- Problematic: You would like to know which powershell version you are using
- Solution: Start a Powershell shell and type the command "$PSVersionTable.PSVersion"
PS H:\> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 610
Powershell Module Management[edit | edit source]
MicrosoftTeams Module[edit | edit source]
This new powershell module MicrosoftTeams is known to have problem with Powershell version 7, please use OS embedded version 5.1 ! |
- Information: Microsoft is slowly replacing Skype for Business Online Powershell module with a new one MicrosoftTeams. This new module includes the same connection modules with some additional commands dedicated for Teams. https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install
MicrosoftTeams : Install the module[edit | edit source]
Do not use Powershell version 7, use embedded version 5.1 |
- Problematic: You would like to install the MicrosoftTeams powershell module
- Additional Information : please refer to https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install
- Solution: Follow the procedure below
- Open Start menu and search "powershell" ( click the small Arrow to open it in Administrator mode ) Make sure to run the embedded version
- Use the powershell commands below to install the module "Install-Module MicrosoftTeams"
- Accept to install the module from Powershell PSRepository
PS C:\WINDOWS\system32> Install-Module MicrosoftTeams
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"): Y
PS C:\WINDOWS\system32> Get-Module -ListAvailable MicrosoftTeams
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.1.6 MicrosoftTeams {Add-TeamUser, Connect-MicrosoftTeams, Disconnect-Microsof...
MicrosoftTeams : What is the installed version of the module[edit | edit source]
- Problematic : You would like to know which version of MicrosoftTeams you are running
- Solution: Use the command below "Get-Module -ListAvailable MicrosoftTeams"
- Additional Information: You can verify the changelog of the version in https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes
PS C:\WINDOWS\system32> Get-Module -ListAvailable MicrosoftTeams
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.1.6 MicrosoftTeams {Add-TeamUser, Connect-MicrosoftTeams, Disconnect-Microsof...
MicrosoftTeams : Update the module to last version[edit | edit source]
- Problematic: You have see that there is a new powershell MicrosoftTeams module in https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes and you would like to install it
- Solution: Follow the procedure below
- Open Start menu and search "powershell" ( click the small Arrow to open it in Administrator mode ) Make sure to run the embedded version
- Use the powershell commands below to remove the module "Update-Module MicrosoftTeams"
PS C:\WINDOWS\system32> Update-Module MicrosoftTeams
MicrosoftTeams : Uninstall the module[edit | edit source]
- Problematic: You would like to uninstall the MicrosoftTeams powershell module
- Additional Information : please refer to https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install
- Solution: Follow the procedure below
- Open Start menu and search "powershell" ( click the small Arrow to open it in Administrator mode ) Make sure to run the embedded version
- Use the powershell commands below to remove the module "Uninstall-Module MicrosoftTeams"
PS C:\WINDOWS\system32> Uninstall-Module MicrosoftTeams
(old) SkypeOnlineConnector / Skype for Business Online[edit | edit source]
- Information: The "Skype for Business Online" powershell module is being replaced with the MicrosoftTeams one, so please prefer using MicrosoftTeams now
(old) SkypeOnlineConnector : Install the "Skype for Business Online" Powershell module[edit | edit source]
- Problematic: You would like to install the old "Skype for Business Online" Powershell module
- Solution: Follow the procedure below
- Download and execute SkypeOnlinePowerShell.exe from https://www.microsoft.com/en-us/download/details.aspx?id=39366
- Open a Powershell shell from start menu
- Type the commands below to import the module and verify its version
(old) SkypeOnlineConnector : What is the version installed ?[edit | edit source]
Here we can see that SkypeOnlineConnector in version 7.0.0.0 is installed
PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned -Force
PS C:\WINDOWS\system32> Import-Module SkypeOnlineConnector
PS C:\WINDOWS\system32> Get-Module -ListAvailable SkypeOnlineConnector
Directory: C:\Program Files\Common Files\Skype for Business Online\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 7.0.0.0 SkypeOnlineConnector {Get-CsOnlinePowerShellEndpoint, Get-CsOnlinePowerShellAcc...
(old) SkypeOnlineConnector : Uninstall the module[edit | edit source]
- Information: Removing the module is recommended if you are now using the MicrosoftTeams module, because it provides the same fonctions in additional of new ones dedicated to MicrosoftTeams management
- Problematic: You would like to uninstall the SkypeOnlineConnector module
- Solution: Follow the procedure below
- Open Start menu and search for "remove" to access the Settings / Add or Remove programs
- Search "skype"
- Click the uninstall button on "Skype for Business Online Powershell" module