Sering beberapa kali pada saat pindah laptop/PC untuk mengakses Microsoft Teams cmdlet mengalami kendala perintah tidak dikenali seperti berikut ini:
PS C:\windows\system32> Install-Module MicrosoftTEams PS C:\windows\system32> Connect-MicrosoftTeams Connect-MicrosoftTeams : The term 'Connect-MicrosoftTeams' 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. At line:1 char:1 + Connect-MicrosoftTeams + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Connect-MicrosoftTeams:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Kalau dibaca-baca di beberapa mailing-list, ini karena environment PowerShell untuk keamanan terhadap script yang tidak dikenal dan berbahaya. Tapi ya belum paham-paham banget detailnya bagaimana. Cuma dapat saran untuk menjalankan perintah berikut ini:
PS C:\windows\system32> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Lalu pilih All jika muncul pertanyaan berikut:
Execution Policy Change The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): a
Setelah itu kita dapat menjalakan MSTeams CmdLet. Dari petunjuk tersebut juga diarahkan untuk membaca doc di https:/go.microsoft.com/fwlink/?LinkID=135170.
Bagaimana kalo di Ubuntu?
Jika menjalankan cmdlet Microsoft Teams dari powershell Ubuntu, tidak memerlukan setting policy seperti di atas. Setelah menginstall module, langsung bisa menjalankan Connect-MicrosoftTeams.