我想通过使用由 Azure 队列触发的 azure 函数来创建团队。不幸的是,当我运行代码时,它在 Azure 函数中不起作用。
我在想。有没有办法在 Azure Function 中使用 PowerShell 创建 Microsoft Team?
Import-module MicrosoftTeams
$group = New-Team -MailNickname "teamTitle" -displayname "teamTitle" -Visibility "private"
Add-TeamUser -GroupId $group.GroupId -User "user@etc.com"
New-TeamChannel -GroupId $group.GroupId -DisplayName "General"
在当地工作。在 Azure 函数中不起作用。
波纹管我得到的错误:
ERROR: Import-Module : The specified module 'MicrosoftTeams' was not loaded because no valid
module file was found in any module directory. At D:\home\site\wwwroot\CreateTeam\run.ps1:3
char:1 + Import-Module MicrosoftTeams + [...]
谢谢