Bu notta, PowerShell Kullanarak Microsoft Teams’de Ekip Bağlantısı nasıl öğrenilir? Bu konuya değinilmiştir.
Öncelikle bu çalışmada script kullanıldığı için Powershell ISE yönetici olarak açılır.
Yukarıdaki gibi aşağıdak kodu kullanaraki gibi powershell team modülü ile teams bağlantısı kurulur.
Import-Module MicrosoftTeams
$userCredential = Get-Credential
Connect-MicrosoftTeams -Credential $userCredential
Bağlantı kurulduktan sonra yukarıdaki gibi yeni bir sekmede aşağıdaki script çalıştırılır. Aşağıdaki örnekte “Test Ekibi” nin “Genel” kanalının bağlantısı öğrenilmiştir.
# Input Parameters
$teamName=”Test Ekibi”
$channelName=”General”# Get the tenant ID
$tenantId=$connectTeams.TenantId# Get the team
$team=Get-Team -DisplayName $teamName# Get the Group Id
$groupID=$team.GroupId# Get the channel
$channel=Get-TeamChannel -GroupId $groupID | Where-Object {$_.DisplayName -eq $channelName}# Get the channel ID
$channelId=$channel.Id# Get the Team link
$teamLink= “https://teams.microsoft.com/l/team/”+$channelId+”/conversations?groupId=”+$groupID+”&tenantId=”+$tenantId;
Write-Host -F Green $teamLink
Write-Host -F Green $teamName
Aşağıdaki formatta öncelikle ekip bağlantı adresi ve ekip ismi şeklinde bir çıktı elde edilecektir.
https://teams.microsoft.com/l/team/19:54de11e519604e129b3dcf513f653351@thread.tacv2/conversations?groupId=2e11f86f-b4c4-4354-90b1-1cd13e8a1fc5&tenantId=9bf387fc-915a-4cd0-9e38-4e77e13466425
Test Ekibi